/* Shooting Star "Daylight" design: warm cream canvas, navy ink, brand gold.
   Loaded after style.css, which keeps only the mobile menu animation and the script dialogs. */

:root {
    --navy: #1C2F43;
    --navy-hover: #2A4560;
    --navy-deep: #083241;
    --gold: #F9BD04;
    --gold-light: #FFE186;
    --gold-hover: #FFCB2E;
    --cream: #FBF6EA;
    --cream-hover: #FFF9E8;
    --band: #F5E9C8;
    --band-line: #EADBB2;
    --band-line-strong: #D8C38C;
    --rule: #F0E6CC;
    --paper: #FFFFFF;
    --ink: #1C2F43;
    --ink-soft: #54503F;
    --error: #A3242A;
    --error-tint: #FDF1EF;
    --error-line: #EBC0BC;
    --success: #0B7A3E;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow-card: 0 18px 40px -18px rgba(70, 52, 10, 0.28), 0 2px 6px rgba(70, 52, 10, 0.06);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }

::selection { background: var(--gold-light); color: var(--navy); }

:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
    border-radius: 6px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
#navigation-mobile-menu :focus-visible { outline-color: var(--gold-light); }

html { scrollbar-color: #CDB988 var(--cream); }

h1, h2, h3 { text-wrap: balance; }

.wrap {
    width: min(1140px, 100% - 40px);
    margin-inline: auto;
}

.wrap--narrow { width: min(860px, 100% - 40px); }
.wrap--reading { width: min(900px, 100% - 40px); }
.wrap--form { width: min(540px, 100% - 40px); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.section-title {
    margin: 0 0 28px;
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.section-title--center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn--primary {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 6px 14px -6px rgba(70, 52, 10, 0.4);
}

.btn--primary:hover { background: var(--gold-hover); box-shadow: 0 10px 20px -8px rgba(70, 52, 10, 0.45); }
.btn--primary:active { transform: translateY(1px); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-hover); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }

.btn--quiet { border-color: var(--band-line); color: var(--navy); }
.btn--quiet:hover { background: var(--cream); border-color: var(--band-line-strong); }

.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn--block { width: 100%; }

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--navy);
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.icon-button:hover { border-color: var(--navy); background: var(--cream); }
.icon-button svg { width: 16px; height: 16px; }

.text-button {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.text-button:hover { color: var(--navy); }

/* ---------- Form fields ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    caret-color: var(--navy);
    transition: border-color 0.2s var(--ease-out);
}

input:hover { border-color: var(--band-line-strong); }
input:focus { border-color: var(--navy); }
input[readonly] { background: var(--cream); color: var(--ink-soft); }
input::placeholder { color: #776F5C; opacity: 1; }

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    flex-shrink: 0;
    accent-color: var(--navy);
}

.input--qty { width: 84px; }

.field,
.checkout-field {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.field label,
.checkout-field-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.checkout-field-text + .checkout-field-text { margin-top: 2px; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-top: 24px;
}

.form-actions--end { justify-content: flex-end; }
.form-actions--center { justify-content: center; }

.forgottenPassword {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    color: var(--ink-soft);
    text-decoration: underline;
    text-decoration-color: var(--band-line-strong);
    text-underline-offset: 3px;
}

.forgottenPassword:hover { color: var(--navy); text-decoration-color: var(--navy); }

.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    color: var(--ink-soft);
}

/* passwdValidate() in functions.js adds is-met / is-unmet as the password is typed. */
.password-rules > li {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.25s var(--ease-out);
}

.rule-icon {
    flex: none;
    width: 22px;
    height: 22px;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.35s var(--ease-out);
}

.rule-icon circle {
    stroke: var(--band-line-strong);
    transition: fill 0.25s var(--ease-out), stroke 0.25s var(--ease-out);
}

.rule-icon__tick,
.rule-icon__cross { stroke: none; }

.password-rules > .is-met { color: var(--ink); }
.password-rules > .is-met .rule-icon { transform: scale(1.08); }
.password-rules > .is-met circle { fill: var(--success); stroke: var(--success); }
.password-rules > .is-met .rule-icon__tick { stroke: var(--paper); }

.password-rules > .is-unmet { color: var(--error); }
.password-rules > .is-unmet circle { fill: var(--error-tint); stroke: var(--error); }
.password-rules > .is-unmet .rule-icon__cross { stroke: var(--error); }

/* The password field glows red once it has been left with rules still unmet. */
input.is-invalid,
input.is-invalid:hover,
input.is-invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(163, 36, 42, 0.14), 0 2px 10px rgba(163, 36, 42, 0.18);
}

input.is-valid { border-color: var(--success); }

@media (max-width: 420px) {
    .password-rules { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .password-rules > li,
    .rule-icon,
    .rule-icon circle { transition: none; }
}

/* functions.js shows this with display:block when a login or reset fails. */
.form-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border: 2px solid var(--error-line);
    border-radius: var(--radius-sm);
    background: var(--error-tint);
    color: var(--error);
    text-align: center;
}

.form-alert img { display: block; height: 52px; margin: 0 auto 6px; }
.form-alert p { margin: 0; font-size: 14px; font-weight: 500; }

.form-error { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--error); }

.agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    font-size: 14px;
    cursor: pointer;
}

.fine-print { margin: 18px 0; font-size: 13px; color: var(--ink-soft); }

.empty-note { margin: 0 0 14px; text-align: center; color: var(--ink-soft); }

/* ---------- Header ---------- */

.site-header {
    position: relative;
    height: 132px;
    overflow: hidden;
    background: var(--navy) url("../images/header-poster.jpg") center / cover no-repeat;
}

.site-header__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* iPhones in Low Power Mode refuse to autoplay and draw a play button over the
   video instead. Hide it, so the poster frame shows as a still header. */
.site-header__video::-webkit-media-controls,
.site-header__video::-webkit-media-controls-start-playback-button,
.site-header__video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
}

/* A gentle darkening on the right keeps the white nav readable over the bright video. */
.site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(40, 24, 0, 0) 35%, rgba(40, 24, 0, 0.38) 100%);
    pointer-events: none;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-right: auto;
    color: inherit;
}

.brand__mark { width: 92px; height: auto; margin-top: 26px; }

.brand__words { display: flex; flex-direction: column; line-height: 1; }

.brand__name {
    font-size: 30px;
    font-weight: 600;
    color: var(--gold-light);
    text-shadow: 0 0 5px var(--gold-light);
    white-space: nowrap;
}

.brand__sub {
    margin-top: 2px;
    font-size: 28px;
    color: var(--gold);
    text-shadow: 0 1px 4px rgba(60, 35, 0, 0.5);
    transform: scaleY(0.8);
    transform-origin: top left;
}

.site-header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.site-nav { display: flex; gap: 28px; }

.site-nav a {
    position: relative;
    padding: 6px 0;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(60, 35, 0, 0.55);
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gold-light);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover::after { transform: scaleX(1); }

.site-actions { display: flex; align-items: center; gap: 10px; }

.basket-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(60, 35, 0, 0.55);
}

.basket-link svg { width: 22px; height: 22px; }

.basket-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--gold-light);
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    text-shadow: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- Mobile menu (loadMenu() slides it in) ---------- */

#navigationBackground {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: var(--navy-deep);
}

#navigation-mobile-menu {
    position: fixed;
    top: 0;
    left: -250px;
    z-index: 3;
    box-sizing: border-box;
    width: 250px;
    height: 100%;
    padding: 30px 0 24px;
    overflow-y: auto;
    background: var(--navy);
}

.mobile-menu__logo { display: block; width: 70px; margin: 10px 0 20px 24px; }

#navigation-mobile-menu .menu-button {
    padding: 13px 24px;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    transition: color 0.2s var(--ease-out);
}

#navigation-mobile-menu a:hover .menu-button { color: var(--gold-light); }

/* ---------- Draw date chip and price ---------- */

.draw-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--band);
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
}

.draw-chip svg { width: 18px; height: 18px; }

.price-line { display: flex; align-items: baseline; gap: 10px; margin: 0; }

.price {
    font-size: clamp(44px, 5vw, 60px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.price--sm { font-size: 34px; }
.price--xs { font-size: 22px; letter-spacing: -0.02em; }

.price__unit { font-size: 16px; font-weight: 500; color: var(--ink-soft); }

/* Shown in place of a prize photo when the competition has none uploaded. */
.photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--band);
}

.photo-placeholder img { width: 28%; max-width: 96px; height: auto; }

/* ---------- Page shell and panels ---------- */

.page {
    padding-bottom: 72px;
    background: linear-gradient(180deg, var(--band) 0, var(--band) 240px, var(--cream) 240px);
}

.page--empty { min-height: 360px; }

.page-head { padding: 40px 0 32px; text-align: center; }

.page-title {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--navy);
}

.panel {
    box-sizing: border-box;
    padding: 36px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
}

.panel__title {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy);
}

.panel__title--lg {
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.panel__title--spaced { margin-top: 40px; }

.panel__intro { margin: 0 0 4px; color: var(--ink-soft); }

/* ---------- Home: featured prize ---------- */

.featured {
    padding: 56px 0 64px;
    background: linear-gradient(180deg, var(--band) 0, var(--band) 62%, var(--cream) 62%);
}

.prize-card {
    display: grid;
    grid-template-columns: 7fr 5fr;
    min-height: 440px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
    color: var(--ink);
}

.prize-card__media { overflow: hidden; background: #3B3F45; }

.prize-card__media > img,
.prize-tile__media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease-out);
}

.prize-card:hover .prize-card__media > img,
.prize-tile:hover .prize-tile__media > img { transform: scale(1.035); }

.prize-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    padding: 48px;
}

.prize-card__title {
    margin: 0;
    font-size: clamp(32px, 3.6vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.prize-card .btn { margin-top: 8px; }
.prize-card .btn svg,
.prize-tile .btn svg { transition: transform 0.3s var(--ease-out); }
.prize-card:hover .btn,
.prize-tile:hover .btn { background: var(--gold-hover); }
.prize-card:hover .btn svg,
.prize-tile:hover .btn svg { transform: translateX(4px); }

/* ---------- Competitions list ---------- */

.prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.prize-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
    color: var(--ink);
}

.prize-tile__media { aspect-ratio: 16 / 10; overflow: hidden; background: #3B3F45; }

.prize-tile__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 24px 24px;
}

.prize-tile__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.prize-tile .btn { margin-top: auto; }

/* ---------- How to play ---------- */

.how { padding: 24px 0 80px; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step { text-align: center; }

.step__art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 5 / 4;
    padding: 18px;
    border: 1px solid var(--band-line);
    border-radius: var(--radius);
    background: var(--paper);
}

.step__art img { width: 100%; height: 100%; object-fit: contain; }

.step__num {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -20px auto 0;
    border: 4px solid var(--cream);
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.step__title {
    margin: 12px 0 6px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

.step p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ---------- FAQ quick links and help topics (bands above the banner) ---------- */

.quick-links,
.help-topics {
    padding: 22px 0;
    border-top: 1px solid var(--band-line);
    background: var(--band);
}

.quick-links__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s var(--ease-out);
}

.quick-link:hover { border-color: var(--band-line-strong); }

.help-topics__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 28px;
    margin-block: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--ink-soft);
}

/* ---------- Play today banner ---------- */

.play-banner {
    background: #6B4A12 url('../images/background3.jpg') center / cover;
}

.play-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px 0;
}

.play-banner__line {
    margin: 0;
    font-size: clamp(26px, 3.6vw, 44px);
    font-style: italic;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.play-banner__mascot { width: 84px; height: auto; flex-shrink: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: #D9E3E8; }

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.4fr;
    gap: 32px;
    padding: 56px 0 40px;
}

.site-footer .brand__mark { width: 52px; margin-top: 0; }
.site-footer .brand__name { font-size: 20px; }
.site-footer .brand__sub { font-size: 18px; }

.footer-links a {
    display: block;
    padding: 4px 0;
    font-size: 15px;
    color: #E8EEF1;
}

.footer-links a:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.site-footer__base-bar { background: #10243A; }

.site-footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 20px 0 24px;
    font-size: 13px;
    color: #B9C7CE;
}

/* ---------- Competition page ---------- */

.product {
    padding: 8px 0 80px;
    background: linear-gradient(180deg, var(--band) 0, var(--band) 420px, var(--cream) 420px);
}

.product__head { padding: 28px 0; text-align: center; }
.product__head .entry-panel__title { margin: 0 0 12px; }
.product__head .draw-chip { background: var(--paper); }

.product__grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: start;
}

.gallery { position: sticky; top: 24px; }

.gallery__main {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius);
    background: #3B3F45;
    box-shadow: var(--shadow-card);
}

.gallery__main > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.gallery__thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: #3B3F45;
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out);
}

.gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { border-color: var(--band-line-strong); }
.gallery__thumb[aria-current="true"] { border-color: var(--navy); }

.entry-panel {
    padding: 36px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
}

.entry-panel__title {
    margin: 14px 0 10px;
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.entry-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--ink-soft);
}

.entry-facts li { display: flex; align-items: center; gap: 8px; }
.entry-facts svg,
.entry-facts img { width: 22px; height: 22px; object-fit: contain; }

.entry-step {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--rule);
}

.entry-step__title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; }
.entry-step__question { margin: 4px 0 16px; font-size: 16px; color: var(--ink-soft); }

.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.answer {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 14px 8px 10px;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--navy);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.answer:hover { border-color: var(--band-line-strong); background: var(--cream-hover); }

.answer__icon { display: flex; width: 32px; height: 32px; flex-shrink: 0; }

/* answerButton() writes the icon with an inline width and opacity. */
.answer__icon img { width: 32px !important; height: 32px; object-fit: contain; }

.answer[aria-pressed="true"] {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(28, 47, 67, 0.7);
}

.entry-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }

.tickets-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

/* The slider script moves this label along the bar; here it stays a fixed readout. */
#competition-entry-label.tickets-count {
    position: static !important;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 15px;
    color: var(--ink-soft);
}

#numTickets {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.ticket-slider {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

#rangeSlider { display: flex; align-items: center; }

.step-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--navy);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.step-button:hover { border-color: var(--navy); background: var(--cream); }
.step-button svg { width: 18px; height: 18px; }

/* The bar rangeSlider() builds sets inline styles, so these need !important. */
#rangeSliderContainer { height: 28px !important; }
#slideArea { height: 8px !important; border-radius: 4px; background: #EFE3C2 !important; }
#slideAreaFill { border-radius: 4px; background: var(--gold) !important; }
/* The handle is drawn small; this gives the finger a 44px target around it. */
#slidingToggle::before {
    content: "";
    position: absolute;
    inset: -15px;
}

#slidingToggle {
    box-sizing: border-box;
    width: 22px !important;
    height: 22px !important;
    border: 4px solid var(--navy);
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(28, 47, 67, 0.3);
}

.entry-actions {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.live-draw {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--band);
    font-size: 14px;
    color: var(--ink-soft);
}

.live-draw img { width: 40px; height: auto; flex-shrink: 0; }
.live-draw strong { display: block; font-size: 15px; color: var(--navy); }

/* Postal entry text, shown in the dialog loadPostalVote() opens. */
.postalVoteText { max-width: 560px; overflow-y: auto; color: var(--ink); }

/* The install prompt showInstallPromotion() builds with inline styles. */
#installPromotion { background: var(--navy) !important; }

/* ---------- FAQ ---------- */

.faq-list { padding: 8px 0; }

/* How to play follows the FAQ list on the FAQ page. */
.wrap--narrow + .how { padding-top: 64px; }

.faq + .faq { border-top: 1px solid var(--rule); }

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 20px 32px;
    border: 0;
    background: none;
    color: var(--navy);
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.faq__question::after {
    content: "";
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-right: 2.5px solid var(--gold);
    border-bottom: 2.5px solid var(--gold);
    transform: translateY(-3px) rotate(45deg);
}

.faq__question:hover { background: var(--cream); }

/* openFaq() shows one answer at a time with an inline display:block. */
.faqText {
    display: none;
    max-width: 68ch;
    padding: 0 32px 24px;
    color: var(--ink-soft);
}

/* ---------- Basket ---------- */

.basket { padding: 12px 32px 28px; }

.basket-header,
.basket-row {
    grid-template-columns: 80px minmax(0, 2fr) 100px 110px 100px 44px;
    gap: 16px;
    align-items: center;
}

.basket-header {
    display: grid;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
}

.basket-row {
    display: grid;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
    font-variant-numeric: tabular-nums;
}

.basket-row__photo {
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
    background: #3B3F45;
}

.basket-row__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.basket-row__title { font-weight: 600; }
.basket-row__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.basket-row__answer { font-size: 14px; color: var(--ink-soft); }
.basket-row__subtotal { font-weight: 600; }

.basket-items-mobile { display: none; }

.basket-card {
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
}

.basket-card .basket-row__photo { width: 96px; height: 96px; }

.basket-card__qty { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.basket-card__foot { display: flex; align-items: center; justify-content: space-between; }

.basket-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.discount-form { display: flex; gap: 8px; }
.discount-form input { width: 190px; min-width: 0; }

.totals-panel { max-width: 460px; margin: 24px 0 0 auto; }

.totals {
    display: grid;
    grid-template-columns: 1fr auto;
    margin: 12px 0 22px;
    font-variant-numeric: tabular-nums;
}

.totals dt,
.totals dd {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}

.totals dt { color: var(--ink-soft); }
.totals dd { font-weight: 600; text-align: right; }

.totals .totals__grand {
    border-bottom: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

/* ---------- Checkout ---------- */

.checkout-container {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
}

.order-summary { position: sticky; top: 24px; }

.account-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 32px;
    font-size: 17px;
}

.page-head .account-prompt { justify-content: center; margin-top: 16px; }

.order-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
}

.order-item__photo {
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 8px;
    background: #3B3F45;
}

.order-item__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.order-item__title { font-size: 15px; font-weight: 600; }
.order-item__total { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.popup-login { width: min(400px, calc(100vw - 92px)); }

/* ---------- Login, sign up and message pages ---------- */

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    padding-top: 48px;
}

.wrap--form { padding-top: 48px; }

.auth-panel { padding: 40px; }

.message-panel { text-align: center; }
.message-panel .panel__intro + .panel__intro { margin-top: 6px; }
.message-panel__mascot { display: block; width: 72px; margin: 0 auto 12px; }

/* ---------- My account ---------- */

.account-content {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.account-side-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
}

.account-side-menu button {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--navy);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out);
}

.account-side-menu button:hover { background: var(--cream); }

.account-panel { min-height: 320px; padding: 32px; }

.account-page-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.account-page-subtitle { margin: 32px 0 10px; font-size: 19px; font-weight: 600; line-height: 1.3; }

.myAccountLink {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    color: var(--navy);
    cursor: pointer;
}

.myAccountLink:hover { text-decoration-color: var(--navy); }

.account-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }

.myAccountTab,
.smallButton {
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--navy);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.smallButton { min-height: 36px; padding: 0 12px; font-size: 13px; }

.myAccountTab:hover,
.smallButton:hover { border-color: var(--navy); background: var(--cream); }

.entry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.myAccountCompetition {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px;
    border: 1px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--cream);
}

.myAccountCompetition__title { font-weight: 600; line-height: 1.35; }
.myAccountCompetition__meta { font-size: 14px; color: var(--ink-soft); }

.myAccountCompetition__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.ticket-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }

.ticket-no {
    min-width: 34px;
    padding: 3px 6px;
    box-sizing: border-box;
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ticket-group-title { margin-top: 14px; font-weight: 600; }

.prize-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 18px;
    align-items: center;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--band-line);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--ink);
    transition: border-color 0.2s var(--ease-out);
}

.prize-row:hover { border-color: var(--band-line-strong); }

.prize-row__media {
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    background: #3B3F45;
}

.prize-row__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prize-row__title { font-weight: 600; line-height: 1.35; }

.order-list-head,
.order-list-item {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 12px;
    padding: 12px;
}

.order-list-head {
    margin-top: 16px;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
}

.order-list-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--rule);
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out);
}

.order-list-item:hover { background: var(--cream); }
.order-list-item--cancelled { color: var(--error); }

.content-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 6px 16px;
    margin: 12px 0 0;
}

.content-grid dt { font-weight: 600; color: var(--ink-soft); }
.content-grid dd { margin: 0; }

.order-lines { overflow-x: auto; }

.order-line {
    display: grid;
    grid-template-columns: 2fr 1fr 0.6fr 1fr 1fr;
    gap: 12px;
    min-width: 520px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    font-variant-numeric: tabular-nums;
}

.order-line--head { font-size: 14px; font-weight: 600; color: var(--ink-soft); }

.order-line--sum {
    grid-template-columns: 1fr 140px;
    border-bottom: 0;
    font-weight: 600;
    text-align: right;
}

/* ---------- Prompt dialog (prompt() in functions.js) ---------- */

.prompt-dialog {
    box-sizing: border-box;
    width: min(400px, calc(100vw - 32px));
    padding: 26px 24px 22px;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 24px 60px -20px rgba(8, 20, 33, 0.45);
    color: var(--ink);
}

.prompt-dialog__title { font-size: 19px; font-weight: 700; }
.prompt-dialog__text { margin-top: 8px; color: var(--ink-soft); line-height: 1.5; }

.prompt-dialog__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

/* The postal entry and checkout login pop-ups are sized inline by functions.js. */
#loadUserCheck,
#popupLogin {
    box-sizing: border-box;
    max-width: calc(100vw - 32px);
}

/* ---------- Policy and custom pages ---------- */

.prose {
    padding: 56px 64px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
}

/* Pasted page content often carries its own fonts (Calibri from Word); the site font wins. */
.prose * { font-family: inherit !important; }

.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2,
.prose h3,
.prose h4 { margin: 1.8em 0 0.5em; line-height: 1.25; color: var(--navy); }
.prose h2 { font-size: 26px; letter-spacing: -0.015em; }
.prose h3 { font-size: 21px; }
.prose ul,
.prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.3em; }
.prose img { max-width: 100%; height: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td,
.prose th { padding: 8px 10px; border: 1px solid var(--rule); text-align: left; }

.prose a:not(.btn) {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.not-found { text-align: center; }
.not-found p { margin-bottom: 24px; color: var(--ink-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .site-nav { gap: 20px; }
    .basket-link__label { display: none; }
}

@media (max-width: 960px) {
    .site-header { height: 104px; }
    .site-nav,
    .site-actions .btn { display: none; }
    .site-header__right { flex-direction: row; align-items: center; }
    .menu-toggle { display: inline-flex; }
    .brand { gap: 10px; }
    .brand__mark { width: 60px; margin-top: 18px; }
    .brand__name { font-size: 21px; }
    .brand__sub { font-size: 19px; }
    .site-header__inner { gap: 8px; }
    .site-actions { gap: 4px; }

    .prize-card { grid-template-columns: 1fr; min-height: 0; }
    .prize-card__media { aspect-ratio: 16 / 10; }
    .prize-card__body { gap: 14px; padding: 28px 24px 30px; }

    .steps { grid-template-columns: 1fr 1fr; gap: 32px 20px; }

    .product__head { padding: 20px 0; }
    .product__grid { grid-template-columns: 1fr; gap: 24px; }
    .gallery { display: contents; }
    .gallery__main,
    .gallery__thumbs { order: 0; }
    .entry-panel { order: 1; }
    .gallery > .live-draw { order: 2; margin-top: 0; }
    .gallery__main { aspect-ratio: 16 / 10; }
    .gallery__thumbs { margin-top: -12px; }

    .checkout-container,
    .auth-grid { grid-template-columns: 1fr; }
    /* minmax(0, 1fr) keeps a wide order table from stretching the page sideways. */
    .account-content { grid-template-columns: minmax(0, 1fr); }
    .order-summary { position: static; }
    .account-side-menu { display: grid; grid-template-columns: 1fr 1fr; }
    .account-side-menu button:last-child:nth-child(odd) { grid-column: 1 / -1; }

    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    .basket-header,
    .basket-items-large { display: none; }
    .basket-items-mobile { display: grid; }
    .basket { padding: 4px 20px 24px; }
    /* No wrap: a wrapping column line grows to its widest item and spills out of the card. */
    .basket-actions { flex-direction: column-reverse; flex-wrap: nowrap; align-items: stretch; }
    .discount-form input { width: auto; flex: 1; }
    .totals-panel { max-width: none; }
}

@media (max-width: 560px) {
    .featured { padding: 36px 0 44px; }
    .section-title { margin-bottom: 20px; }
    .steps { grid-template-columns: 1fr; gap: 36px; }
    .step__art { aspect-ratio: 2 / 1; padding: 12px; }
    .how { padding-bottom: 56px; }

    .play-banner__inner { padding: 28px 0; }
    .play-banner__mascot { width: 60px; }

    .product {
        padding-top: 20px;
        background: linear-gradient(180deg, var(--band) 0, var(--band) 260px, var(--cream) 260px);
    }
    .gallery__thumbs { gap: 8px; }
    .entry-panel { padding: 24px 20px; }
    .answers { grid-template-columns: 1fr; }

    .page { background: linear-gradient(180deg, var(--band) 0, var(--band) 180px, var(--cream) 180px); }
    .page-head { padding: 28px 0 24px; }
    .panel,
    .auth-panel,
    .account-panel { padding: 24px 20px; }
    .auth-grid,
    .wrap--form { padding-top: 28px; }
    .field-pair { grid-template-columns: 1fr; gap: 0; }
    .prose { padding: 28px 22px; font-size: 16px; }
    .faq__question { padding: 18px 20px; font-size: 17px; }
    .faqText { padding: 0 20px 20px; }
    .prize-row { grid-template-columns: 88px 1fr; }
    .prize-row .btn { grid-column: 1 / -1; }
    .content-grid { grid-template-columns: 1fr; }

    .smallButton { min-height: 44px; }
    .account-side-menu button { font-size: 14px; white-space: nowrap; }
    .discount-form { flex-direction: column; }
    .discount-form .btn { width: 100%; }

    /* Fixed outer tracks, so the columns line up from row to row. */
    .order-list-head,
    .order-list-item { grid-template-columns: 64px minmax(0, 1fr) 68px; column-gap: 8px; }
    .order-list-head > *,
    .order-list-item > :first-child,
    .order-list-item > :last-child { white-space: nowrap; }
    .order-list-head > :last-child,
    .order-list-item > :last-child { text-align: right; }

    /* Each order line becomes a stacked card: the title, then answer, quantity and prices. */
    .order-line--head { display: none; }
    .order-line {
        grid-template-columns: 1fr auto;
        gap: 4px 12px;
        min-width: 0;
    }
    .order-line:not(.order-line--sum) > :first-child { grid-column: 1 / -1; font-weight: 600; }
    .order-line:not(.order-line--sum) > :nth-child(2)::before { content: "Answer: "; color: var(--ink-soft); }
    .order-line:not(.order-line--sum) > :nth-child(3)::before { content: "Qty: "; color: var(--ink-soft); }
    .order-line:not(.order-line--sum) > :nth-child(3) { text-align: right; }
    .order-line:not(.order-line--sum) > :nth-child(4)::before { content: "Each: "; color: var(--ink-soft); }
    .order-line:not(.order-line--sum) > :nth-child(5) { text-align: right; font-weight: 600; }
    .order-line--sum { grid-template-columns: 1fr auto; }

    .site-footer__grid { gap: 20px; padding-top: 40px; }
    .footer-links a { padding: 10px 0; }
    .site-footer__base { flex-direction: column; }
}

@media (max-width: 380px) {
    .brand { gap: 6px; }
    .brand__mark { width: 50px; margin-top: 14px; }
    .brand__name { font-size: 18px; }
    .brand__sub { font-size: 16px; }
    .basket-link { padding: 0 4px; }
    .tickets-head .entry-step__title { font-size: 17px; white-space: nowrap; }
    #numTickets { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
