@import url('https://fonts.cdnfonts.com/css/pricedown');

:root {
    --pink: #ff4fc3;
    --hot-pink: #ff149d;
    --cyan: #29dfff;
    --aqua: #31ffd2;
    --yellow: #ffe66d;
    --orange: #ff8b3d;
    --ink: #241437;
    --paper: rgba(255, 255, 255, 0.92);
    --line: rgba(36, 20, 55, 0.16);
    --shadow: 0 18px 40px rgba(86, 8, 81, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f95ab8;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 14% 10%, rgba(255, 230, 109, 0.95) 0 11%, transparent 12%),
        linear-gradient(145deg, rgba(255, 79, 195, 0.94), rgba(41, 223, 255, 0.86) 48%, rgba(49, 255, 210, 0.84)),
        #f95ab8;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 58%, rgba(255, 255, 255, 0.22) 58.4% 59.6%, transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 7px);
    mix-blend-mode: soft-light;
}

header,
main,
footer {
    position: relative;
    width: min(100%, 760px);
    margin: 0 auto;
    padding-inline: clamp(16px, 5vw, 30px);
}

header {
    padding-top: max(22px, env(safe-area-inset-top));
}

.hero {
    position: relative;
    min-height: 32vh;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    padding: 28px 0 22px;
}

.language-switcher {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 8px;
}

.language-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 8px;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    text-decoration: none;
    background: rgba(36, 20, 55, 0.2);
    box-shadow: 0 8px 20px rgba(36, 20, 55, 0.14);
}

.language-link.is-active {
    color: var(--ink);
    background: rgba(255, 230, 109, 0.92);
}

.flag-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(36, 20, 55, 0.18);
}

.flag-br {
    background: #169b62;
}

.flag-br::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 7px;
    width: 10px;
    height: 10px;
    background: #ffdf00;
    transform: rotate(45deg);
}

.flag-br::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #002776;
}

.flag-us {
    background: repeating-linear-gradient(
        to bottom,
        #b22234 0 1.23px,
        #fff 1.23px 2.46px
    );
}

.flag-us::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 9px;
    background: #3c3b6e;
}

.eyebrow {
    width: fit-content;
    margin: 0;
    padding: 7px 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    color: #fff;
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(36, 20, 55, 0.18);
    box-shadow: 0 8px 20px rgba(36, 20, 55, 0.14);
}

h1,
h2,
.section-title,
.tide-type {
    font-family: "Pricedown Bl", Impact, Haettenschweiler, "Arial Black", sans-serif;
    font-weight: 400;
}

h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(3.8rem, 21vw, 8.3rem);
    line-height: 0.78;
    letter-spacing: 0;
    text-shadow:
        -2px -2px 0 var(--ink),
        2px -2px 0 var(--ink),
        -2px 2px 0 var(--ink),
        2px 2px 0 var(--ink),
        0 8px 0 var(--hot-pink),
        0 13px 26px rgba(36, 20, 55, 0.42);
}

h2 {
    max-width: 15rem;
    margin: 4px 0 0;
    color: var(--yellow);
    font-size: clamp(1.6rem, 8vw, 2.8rem);
    line-height: 0.94;
    text-shadow:
        -1px -1px 0 var(--ink),
        1px -1px 0 var(--ink),
        -1px 1px 0 var(--ink),
        1px 1px 0 var(--ink),
        0 5px 16px rgba(36, 20, 55, 0.26);
}

main {
    padding-bottom: 28px;
}

.panel {
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 252, 0.88));
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.today-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.today-title {
    display: flex;
    min-width: 0;
    align-items: end;
    gap: 9px;
}

.section-title {
    margin: 0;
    color: var(--hot-pink);
    font-size: clamp(2rem, 11vw, 3.4rem);
    line-height: 0.86;
    text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--cyan);
}

.weekday {
    padding-bottom: 4px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.top-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: end;
    gap: 6px;
}

.date-pill {
    padding: 8px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--hot-pink), var(--orange));
    box-shadow: 0 7px 16px rgba(255, 20, 157, 0.22);
}

.current-clock {
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 900;
    background: rgba(255, 230, 109, 0.9);
    box-shadow: 0 7px 16px rgba(36, 20, 55, 0.1);
}

.tide-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tide-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(74px, 0.8fr) 1fr;
    gap: 12px;
    min-height: 106px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(41, 223, 255, 0.2), transparent 45%),
        var(--paper);
    box-shadow: 0 12px 24px rgba(36, 20, 55, 0.11);
}

.tide-card.is-current {
    border: 2px solid var(--yellow);
    background:
        linear-gradient(135deg, rgba(255, 230, 109, 0.7), rgba(41, 223, 255, 0.28) 48%, rgba(255, 255, 255, 0.94)),
        var(--paper);
    box-shadow: 0 17px 34px rgba(255, 20, 157, 0.26);
}

.tide-card.is-current::after {
    content: attr(data-current-label);
    position: absolute;
    top: -11px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--hot-pink), var(--orange));
    box-shadow: 0 8px 16px rgba(36, 20, 55, 0.22);
}

.time-block {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(160deg, var(--cyan), var(--hot-pink));
    text-shadow: 0 2px 0 rgba(36, 20, 55, 0.2);
}

.time-block span {
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.time-block strong {
    font-size: clamp(1.35rem, 8vw, 2.15rem);
    line-height: 1;
}

.tide-card.is-current .time-block {
    background: linear-gradient(160deg, var(--hot-pink), var(--orange));
}

.tide-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.tide-type {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 8vw, 2.35rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
    -webkit-text-stroke: 1px var(--hot-pink);
    text-shadow:
        -1px -1px 0 var(--hot-pink),
        1px -1px 0 var(--hot-pink),
        -1px 1px 0 var(--hot-pink),
        1px 1px 0 var(--hot-pink),
        0 4px 10px rgba(36, 20, 55, 0.2);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.79rem;
    font-weight: 800;
    background: rgba(255, 230, 109, 0.78);
}

.empty-state {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.86);
}

.seo-copy {
    margin: 14px 0 0;
    color: rgba(36, 20, 55, 0.82);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
}

.faq {
    margin-top: 16px;
}

.faq-title {
    margin-bottom: 12px;
    font-size: clamp(1.6rem, 8vw, 2.4rem);
}

.faq-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
}

.faq-item + .faq-item {
    margin-top: 8px;
}

.faq-item summary {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
    cursor: pointer;
}

.faq-item p {
    margin: 8px 0 0;
    color: rgba(36, 20, 55, 0.85);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
}

footer {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.affiliate-rails {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 760px);
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 auto 16px;
    padding-inline: clamp(16px, 5vw, 30px);
}

.affiliate-rail {
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.68);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 252, 0.76));
    box-shadow: 0 12px 26px rgba(36, 20, 55, 0.16);
    backdrop-filter: blur(12px);
}

.affiliate-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
}

.affiliate-heading span {
    color: var(--hot-pink);
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.affiliate-heading h3 {
    margin: 0;
    color: var(--hot-pink);
    font-family: "Pricedown Bl", Impact, Haettenschweiler, "Arial Black", sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 0.92;
    text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--cyan);
}

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

.affiliate-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 16px rgba(36, 20, 55, 0.09);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.affiliate-card:focus-visible,
.affiliate-card:hover {
    border-color: rgba(255, 20, 157, 0.45);
    box-shadow: 0 12px 22px rgba(255, 20, 157, 0.16);
    transform: translateY(-2px);
}

.affiliate-image-wrap {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 6px;
    background: #fff;
}

.affiliate-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.affiliate-card-title {
    display: -webkit-box;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.16;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.affiliate-note {
    grid-column: 1 / -1;
    margin: 0;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-shadow: 0 2px 7px rgba(36, 20, 55, 0.35);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0 22px;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 7px rgba(36, 20, 55, 0.35);
}

.footer-content small {
    font-size: 0.75rem;
    font-weight: 800;
}

@media (min-width: 620px) {
    .hero {
        min-height: 34vh;
    }

    h2 {
        max-width: 26rem;
    }

    .panel {
        padding: 20px;
    }

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

@media (min-width: 1120px) {
    .affiliate-rails {
        display: contents;
    }

    .affiliate-rail {
        position: fixed;
        top: 122px;
        z-index: 2;
        width: 170px;
        max-height: calc(100vh - 146px);
        overflow-y: auto;
    }

    .affiliate-rail-left {
        left: max(16px, calc((100vw - 1140px) / 2));
    }

    .affiliate-rail-right {
        right: max(16px, calc((100vw - 1140px) / 2));
    }

    .affiliate-list {
        grid-template-columns: 1fr;
    }

    .affiliate-card {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 6px;
        padding: 10px;
        text-align: center;
    }

    .affiliate-image-wrap {
        width: 76px;
        height: 76px;
    }

    .affiliate-card-title {
        -webkit-line-clamp: 2;
    }

    .affiliate-note {
        position: fixed;
        right: max(16px, calc((100vw - 1140px) / 2));
        bottom: 12px;
        z-index: 2;
        width: 170px;
        font-size: 0.6rem;
    }
}