/* Mobile-first. Everything here assumes a phone held one-handed at a cold rink:
   big tap targets, big type, no dense tables. */

:root {
    --ht-navy: #0d3b66;
    --ht-navy-dark: #092c4d;
    --ht-ice: #f4f8fb;
    --ht-line: #d9e2ec;
    --ht-ink: #1b2733;
    --ht-muted: #5b6b7c;
    --ht-placeholder: #7c8b9a; /* light enough to read as a hint, not a typed value */
    --ht-green: #157347;
    --ht-red: #b02a37;
    --ht-tabbar-height: 4.25rem;
    --ht-tap: 3rem; /* minimum comfortable tap target */

    /* Depth instead of outlines. A 1px border round everything is what makes an
       interface look a decade old; a soft shadow does the same job more quietly. */
    --ht-hairline: #e8eef4;
    --ht-shadow-sm: 0 1px 2px rgba(16, 40, 64, 0.05), 0 1px 3px rgba(16, 40, 64, 0.04);
    --ht-shadow-md: 0 6px 20px rgba(16, 40, 64, 0.09);
    --ht-radius: 0.8rem;
    --ht-radius-lg: 1.15rem;
    --ht-ease: 140ms ease;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --ht-ease: 0ms;
    }
}

html {
    font-size: 17px;
}

body {
    background: var(--ht-ice);
    color: var(--ht-ink);
    -webkit-text-size-adjust: 100%;
}

/* ---------- Header ---------- */

.app-header {
    background: var(--ht-navy);
    color: #fff;
    padding: 0.75rem 0;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}

.app-brand:hover {
    color: #fff;
}

.btn-header {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-height: var(--ht-tap);
    padding-inline: 1rem;
}

.btn-header:hover, .btn-header:focus {
    color: var(--ht-navy);
    background: #fff;
}

.app-main {
    padding-block: 1.25rem;
    /* Clear the fixed tab bar so the last card is never trapped underneath it. */
    padding-bottom: calc(var(--ht-tabbar-height) + env(safe-area-inset-bottom) + 1.5rem);
}

/* ---------- Bottom tab bar ---------- */

.app-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--ht-line);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1030;
}

.app-tabbar-inner {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
}

.app-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: var(--ht-tabbar-height);
    padding: 0.4rem 0.25rem;
    color: var(--ht-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    border-top: 3px solid transparent;
}

.app-tab.active {
    color: var(--ht-navy);
    border-top-color: var(--ht-navy);
    background: var(--ht-ice);
}

.app-tab-icon {
    font-size: 1.4rem;
    line-height: 1;
}

/* ---------- Typography and cards ---------- */

h1, .h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

h2, .h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--ht-muted);
    margin-bottom: 1.25rem;
}

.ht-card {
    background: #fff;
    border: 1px solid var(--ht-line);
    border-radius: 0.9rem;
    padding: 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(13, 59, 102, 0.06);
}

.ht-card-title {
    font-size: 1.0rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.ht-card-meta {
    color: var(--ht-muted);
    font-size: 0.95rem;
}

/* Coloured left edge, used to tell one player's sessions from another's. */
.ht-card-accent {
    border-left: 6px solid var(--accent, var(--ht-navy));
}

/* ---------- Buttons ---------- */

.btn {
    min-height: var(--ht-tap);
    font-weight: 600;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-lg {
    min-height: 3.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--ht-navy);
    border-color: var(--ht-navy);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--ht-navy-dark);
    border-color: var(--ht-navy-dark);
}

.btn-block-mobile {
    width: 100%;
}

/* ---------- Forms ---------- */

.form-control, .form-select {
    min-height: var(--ht-tap);
    font-size: 1rem;
    border-radius: 0.65rem;
}

/* Bootstrap's default placeholder is nearly as dark as real input, so an empty
   box looks filled in. Lighter, so a hint reads as a hint. */
.form-control::placeholder {
    color: var(--ht-placeholder);
    opacity: 1;
}

/* Kept separate: an unknown prefixed selector would invalidate the whole list. */
.form-control::-moz-placeholder {
    color: var(--ht-placeholder);
    opacity: 1;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

/* ---------- Status pills ---------- */

.ht-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ht-pill-open { background: #e3f5ea; color: var(--ht-green); }
.ht-pill-tight { background: #fff3cd; color: #8a6100; }
.ht-pill-full { background: #f8d7da; color: var(--ht-red); }
.ht-pill-cancelled { background: #e9ecef; color: #495057; }
.ht-pill-draft { background: #e7e9ff; color: #3a3f9e; }

/* ---------- Empty states ---------- */

.ht-empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--ht-muted);
}

.ht-empty-icon {
    font-size: 2.75rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ---------- Calendar ---------- */

.ht-cal-wrap {
    margin-bottom: 1rem;
}

/* Toolbar: month on the left, Today + view toggle on the right. */
.ht-cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.ht-cal-monthnav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.ht-cal-monthlabel {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    min-width: 8.5rem;
    text-align: center;
}

/* Ghost circles. An outlined box round a chevron reads as a 2012 toolbar. */
.ht-cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--ht-navy);
    text-decoration: none;
    background: transparent;
    border: 0;
    transition: background var(--ht-ease);
}

.ht-cal-arrow:hover,
.ht-cal-arrow:focus-visible {
    background: rgba(13, 59, 102, 0.08);
    color: var(--ht-navy);
}

.ht-cal-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ht-cal-today-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ht-navy);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: rgba(13, 59, 102, 0.07);
    transition: background var(--ht-ease);
}

.ht-cal-today-btn:hover {
    background: rgba(13, 59, 102, 0.14);
    color: var(--ht-navy);
}

/* Segmented Month / Agenda control. */
.ht-segmented {
    display: inline-flex;
    background: rgba(13, 59, 102, 0.07);
    border-radius: 999px;
    padding: 0.2rem;
    gap: 0.15rem;
}

.ht-segment {
    border: 0;
    background: transparent;
    color: var(--ht-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    min-height: 2.3rem;
    cursor: pointer;
    transition: background var(--ht-ease), color var(--ht-ease);
}

.ht-segment.active {
    background: #fff;
    color: var(--ht-navy);
    box-shadow: var(--ht-shadow-sm);
}

/* ---- Month grid ---- */

.ht-cal {
    background: #fff;
    border: 1px solid var(--ht-hairline);
    border-radius: var(--ht-radius-lg);
    box-shadow: var(--ht-shadow-sm);
    padding: 0.35rem;
}

.ht-cal-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    color: var(--ht-muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ht-cal-head div {
    padding: 0.5rem 0.25rem 0.4rem;
    text-align: center;
}

.ht-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

/* No cell borders. Gridlines everywhere make a calendar read as a spreadsheet;
   the day number and its events carry the structure on their own. */
.ht-cal-day {
    border: 0;
    min-height: 6rem;
    padding: 0.35rem 0.3rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: transparent;
    border-radius: var(--ht-radius);
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background var(--ht-ease);
}

.ht-cal-day:hover {
    background: rgba(13, 59, 102, 0.05);
}

.ht-cal-day.selected {
    background: rgba(13, 59, 102, 0.1);
}

.ht-cal-day.outside {
    background: transparent;
    opacity: 0.45;
}

.ht-cal-day.outside .ht-cal-daynum {
    color: var(--ht-muted);
}

.ht-cal-daynum {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ht-ink);
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 50%;
}

.ht-cal-day.today .ht-cal-daynum {
    background: var(--ht-navy);
    color: #fff;
}

.ht-cal-chips {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    overflow: hidden;
}

.ht-cal-chip {
    display: block;
    background: var(--accent, var(--ht-navy));
    color: #fff;
    border-radius: 0.4rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ht-cal-chip.cancelled {
    background: #aeb8c2;
    text-decoration: line-through;
}

.ht-cal-chip-time {
    opacity: 0.85;
}

.ht-cal-more {
    font-size: 0.65rem;
    color: var(--ht-muted);
    font-weight: 700;
}

/* Dots stand in for chips once a cell is too narrow to read words. */
.ht-cal-dots {
    display: none;
    gap: 0.2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 0.15rem;
}

.ht-cal-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--ht-navy);
    display: block;
}

.ht-cal-dot.cancelled {
    background: #c2cad2;
}

/* The panel under the grid showing the tapped day. Its own card rather than a flap
   welded to the bottom of the grid with a negative margin. */
.ht-cal-daypanel {
    background: #fff;
    border: 1px solid var(--ht-hairline);
    border-radius: var(--ht-radius-lg);
    box-shadow: var(--ht-shadow-sm);
    padding: 0.85rem;
    margin-top: 0.6rem;
}

.ht-cal-daypanel-head {
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.ht-cal-daypanel-empty {
    color: var(--ht-muted);
    margin: 0;
}

/* ---- Agenda ---- */

.ht-agenda-day {
    display: flex;
    gap: 0.85rem;
    padding: 0.8rem;
    background: #fff;
    border: 1px solid var(--ht-hairline);
    border-radius: var(--ht-radius-lg);
    box-shadow: var(--ht-shadow-sm);
    margin-bottom: 0.55rem;
}

.ht-agenda-day.today {
    border-color: rgba(13, 59, 102, 0.35);
    box-shadow: var(--ht-shadow-md);
}

.ht-agenda-date {
    flex: none;
    width: 2.9rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.15rem;
}

.ht-agenda-dow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ht-muted);
}

.ht-agenda-dom {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ht-ink);
}

.ht-agenda-day.today .ht-agenda-dom {
    background: var(--ht-navy);
    color: #fff;
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ht-agenda-events {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.ht-agenda-event {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.55rem 0.7rem;
    border-radius: var(--ht-radius);
    background: #f6f9fc;
    border-left: 3px solid var(--accent, var(--ht-navy));
    text-decoration: none;
    color: inherit;
    min-height: var(--ht-tap);
    transition: background var(--ht-ease);
}

a.ht-agenda-event:hover {
    background: #eaf2f8;
    color: inherit;
}

.ht-agenda-event.cancelled {
    opacity: 0.65;
}

.ht-agenda-event.cancelled .ht-agenda-title {
    text-decoration: line-through;
}

.ht-agenda-time {
    flex: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ht-muted);
    width: 5.6rem;
    padding-top: 0.1rem;
}

.ht-agenda-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ht-agenda-title {
    font-weight: 700;
    line-height: 1.3;
}

.ht-agenda-sub {
    font-size: 0.85rem;
    color: var(--ht-muted);
    line-height: 1.35;
}

/* ---- Phone month grid: dots instead of chips, and a shorter cell ---- */
@media (max-width: 767.98px) {
    /* Square-ish cells with the number centred: the shape a phone calendar has. */
    .ht-cal-day {
        min-height: 0;
        aspect-ratio: 1 / 1;
        align-items: center;
        justify-content: flex-start;
        padding: 0.3rem 0.05rem;
        gap: 0.2rem;
    }

    .ht-cal {
        padding: 0.3rem;
    }

    .ht-cal-chips {
        display: none;
    }

    .ht-cal-dots {
        display: flex;
    }

    .ht-cal-daynum {
        width: 1.85rem;
        height: 1.85rem;
        font-size: 0.85rem;
    }

    .ht-cal-monthlabel {
        font-size: 1.1rem;
        min-width: 7rem;
    }

    .ht-cal-toolbar {
        justify-content: space-between;
    }

    .ht-agenda-time {
        width: 100%;
        padding-top: 0;
    }

    .ht-agenda-event {
        flex-direction: column;
        gap: 0.15rem;
    }
}

@media (max-width: 575.98px) {
    .ht-cal-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .ht-segmented {
        flex: 1 1 auto;
    }

    .ht-segment {
        flex: 1 1 0;
    }
}

@media (min-width: 576px) {
    .btn-block-mobile {
        width: auto;
    }
}

/* ---------- Schedule ---------- */

.ht-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.6rem;
    margin-bottom: 0.85rem;
}

.ht-page-head h1 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.ht-page-sub {
    margin: 0;
    color: var(--ht-muted);
    font-size: 0.9rem;
}

.ht-section-head {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ht-muted);
    margin: 1.4rem 0 0.6rem;
}

/* Player filters. Each carries its own colour, so the row is the calendar legend too. */
.ht-chiprow {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.35rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ht-chiprow::-webkit-scrollbar {
    display: none;
}

.ht-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ht-hairline);
    color: var(--ht-ink);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--ht-ease), border-color var(--ht-ease);
}

.ht-chip:hover {
    color: var(--ht-ink);
    border-color: #cfdae5;
}

.ht-chip.active {
    background: var(--ht-navy);
    border-color: var(--ht-navy);
    color: #fff;
}

.ht-chip-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent, var(--ht-navy));
    flex: none;
}

.ht-chip.active .ht-chip-dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

/* One booking. Date rail on the left, everything else stacked tight beside it. */
.ht-sched-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.55rem;
    background: #fff;
    border: 1px solid var(--ht-hairline);
    border-left: 3px solid var(--accent, var(--ht-navy));
    border-radius: var(--ht-radius-lg);
    box-shadow: var(--ht-shadow-sm);
}

.ht-sched-item.cancelled {
    opacity: 0.7;
}

.ht-sched-item.cancelled .ht-sched-title {
    text-decoration: line-through;
}

.ht-sched-when {
    flex: none;
    width: 2.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.1rem;
}

.ht-sched-dow {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ht-muted);
}

.ht-sched-day {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ht-sched-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ht-sched-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ht-sched-who {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent, var(--ht-navy));
}

.ht-sched-title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0.1rem 0 0.25rem;
}

/* Interpuncts between facts rather than a line each: three lines become one. */
.ht-sched-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.5rem;
    font-size: 0.85rem;
    color: var(--ht-muted);
    line-height: 1.35;
}

.ht-sched-meta > span + span::before {
    content: "·";
    margin-right: 0.5rem;
}

.ht-sched-more {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--ht-muted);
}

.ht-sched-more summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ht-navy);
}

.ht-sched-actions {
    margin-top: 0.5rem;
}

/* A destructive action nobody needs most visits: present, not shouting. */
.ht-linkbtn {
    border: 0;
    background: none;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ht-red);
    cursor: pointer;
}

.ht-linkbtn:hover {
    text-decoration: underline;
}


/* Toast telling the viewer the page changed underneath them. */
.ht-live-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--ht-tabbar-height) + env(safe-area-inset-bottom) + 0.75rem);
    background: var(--ht-ink);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1040;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Legend swatch under the staff calendar. */
.ht-legend-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    vertical-align: -0.05rem;
    margin-right: 0.15rem;
}

/* The segmented control doubles as a link group for the Everyone / Mine filter. */
a.ht-segment {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Address suggestions on the arena form. The list is ours rather than Google's
   widget, so that the input the admin types in stays the input that posts. */
.ht-ac {
    position: relative;
}

.ht-ac-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--ht-line);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow-md);
    max-height: 16rem;
    overflow-y: auto;
}

.ht-ac-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.3;
    cursor: pointer;
}

.ht-ac-item.active,
.ht-ac-item:hover {
    background: var(--ht-ice);
}

.ht-ac-main {
    font-weight: 600;
    color: var(--ht-ink);
}

.ht-ac-secondary {
    font-size: 0.85rem;
    color: var(--ht-muted);
}

/* Google asks for the attribution wherever its predictions are shown. */
.ht-ac-credit {
    padding: 0.35rem 0.75rem 0.1rem;
    font-size: 0.7rem;
    color: var(--ht-muted);
    text-align: right;
}

/* An address picked from the list, confirmed rather than typed from memory. */
.form-control.is-address-verified {
    border-color: var(--ht-green);
}

/* ---------- Day picker (choosing which days a clinic runs) ---------- */

.ht-dp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ht-dp-month {
    font-weight: 700;
    font-size: 1.05rem;
}

.ht-dp {
    border: 1px solid var(--ht-line);
    border-radius: 0.7rem;
    overflow: hidden;
}

.ht-dp-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--ht-ice);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ht-muted);
}

.ht-dp-head div {
    padding: 0.4rem 0.1rem;
    text-align: center;
}

.ht-dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.ht-dp-day {
    aspect-ratio: 1 / 1;
    border: 0;
    border-right: 1px solid var(--ht-line);
    border-bottom: 1px solid var(--ht-line);
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ht-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
}

.ht-dp-day:nth-child(7n) {
    border-right: 0;
}

.ht-dp-day:hover:not(:disabled) {
    background: #e7f0f8;
}

.ht-dp-day.outside {
    color: #c2ccd6;
}

.ht-dp-day.today {
    box-shadow: inset 0 0 0 2px #b8cede;
}

.ht-dp-day.selected {
    background: var(--ht-navy);
    color: #fff;
}

.ht-dp-day.selected:hover {
    background: var(--ht-navy-dark);
}

/* Already on the schedule: selected like any other day, with a ring so it is clear
   this one already exists and removing it will do something. */
.ht-dp-day.scheduled {
    box-shadow: inset 0 0 0 2px #7aa7c7;
}

/* Someone is booked on it — the count sits in the corner. */
.ht-dp-day.booked {
    position: relative;
}

.ht-dp-daybadge {
    position: absolute;
    top: 0.1rem;
    right: 0.15rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: #157347;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
}

.ht-dp-day.disabled {
    background: #fafcfe;
    color: #d3dae1;
    cursor: not-allowed;
}

.ht-dp-repeat {
    margin-top: 0.85rem;
}

/* ---- The chosen days, each with its own time ---- */

.ht-dp-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "date times remove" "warning warning warning";
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--ht-line);
}

.ht-dp-row.invalid {
    background: #fff6f6;
}

.ht-dp-row-date {
    grid-area: date;
    font-weight: 700;
    font-size: 0.95rem;
}

.ht-dp-row-times {
    grid-area: times;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ht-dp-row-times .form-control {
    width: auto;
    min-width: 6.6rem;
    min-height: 2.6rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.ht-dp-dash {
    color: var(--ht-muted);
    font-size: 0.85rem;
}

.ht-dp-remove {
    grid-area: remove;
    border: 0;
    background: transparent;
    color: var(--ht-muted);
    font-size: 1.5rem;
    line-height: 1;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

.ht-dp-remove:hover {
    background: #f8d7da;
    color: var(--ht-red);
}

.ht-dp-row-warning {
    grid-area: warning;
    color: var(--ht-red);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .ht-dp-row {
        grid-template-columns: 1fr auto;
        grid-template-areas: "date remove" "times times" "warning warning";
    }

    .ht-dp-row-times .form-control {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Tags on a chosen day: is it new, already scheduled, or booked? */
.ht-dp-row-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.ht-dp-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
}

.ht-dp-tag-new { background: #e7f0f8; color: var(--ht-navy); }
.ht-dp-tag-scheduled { background: #e6ecf2; color: var(--ht-muted); }
.ht-dp-tag-booked { background: #e3f5ea; color: var(--ht-green); }
.ht-dp-tag-multi { background: #fff3cd; color: #8a6100; }

.ht-dp-row.scheduled {
    border-left: 3px solid #7aa7c7;
    padding-left: 0.5rem;
}

/* Standing warning about dates taken off the list. */
[data-dp-removalnote] {
    background: #fff3cd;
    color: #7a5600;
    border-radius: 0.5rem;
    padding: 0.5rem 0.7rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* The address line inside "Getting there", with the maps pin sitting beside it
   rather than under it — the tap target stays on the same line as what it opens. */
.ht-sched-address {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

/* Comfortably tappable on a phone without pushing the line taller than the text. */
.ht-maps-link {
    flex: none;
    margin: -0.35rem 0;
    padding: 0.35rem;
    line-height: 1;
    text-decoration: none;
}

.ht-maps-link:hover {
    filter: brightness(1.15);
}

/* ---------- Home: the one page ----------
   Every clinic is one card. A family reads "am I on this?" off it and signs up in
   place; a coach reads the sign-up count off the same card. Nothing here opens a
   second screen, so the card carries more than a list row would. */

.ht-clinic-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex: none;
}

.ht-clinic-when {
    margin-top: 0.65rem;
}

.ht-clinic-next {
    font-weight: 600;
}

.ht-clinic-price {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ht-navy);
}

.ht-clinic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.ht-clinic-actions .btn {
    flex: 1 1 10rem;
}

/* The number the coach came for, big enough to read at arm's length on the bench. */
.ht-signups {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    background: var(--ht-ice);
    border-radius: var(--ht-radius);
}

.ht-signups-count {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ht-navy);
    font-variant-numeric: tabular-nums;
}

.ht-signups-label {
    font-weight: 600;
    line-height: 1.25;
}

/* "You are on this one" — the first thing a returning parent looks for. */
.ht-booked {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    background: #e3f5ea;
    color: #0f5132;
    border-radius: var(--ht-radius);
    font-size: 0.95rem;
}

.ht-booked-tick {
    font-size: 1.15rem;
    line-height: 1.2;
    flex: none;
}

/* ---- Inline sign-up ----
   A <details> panel, so opening it needs no script and never leaves the page. */

.ht-signup > summary {
    list-style: none;
    cursor: pointer;
    text-align: center;
}

.ht-signup > summary::-webkit-details-marker {
    display: none;
}

.ht-signup[open] > summary {
    background: #fff;
    color: var(--ht-navy);
    border: 1px solid var(--ht-line);
}

.ht-signup-block {
    margin-top: 1rem;
    border: 0;
    padding: 0;
}

.ht-signup-block > legend {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ht-muted);
    margin-bottom: 0.45rem;
}

/* One tappable row per choice. The whole row is the target, not just the control —
   a cold thumb on a phone should not have to find a 1rem circle. */
.ht-choice {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: var(--ht-tap);
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.4rem;
    background: #fff;
    border: 1px solid var(--ht-hairline);
    border-radius: var(--ht-radius);
    cursor: pointer;
}

.ht-choice:has(input:checked) {
    border-color: var(--ht-navy);
    background: var(--ht-ice);
}

.ht-choice:has(input:focus-visible) {
    outline: 2px solid var(--ht-navy);
    outline-offset: 2px;
}

.ht-choice.disabled {
    opacity: 0.55;
    cursor: default;
}

.ht-choice input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--ht-navy);
}

.ht-choice-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ht-choice-date-main {
    font-weight: 600;
}

.ht-choice-date-meta {
    font-size: 0.85rem;
    color: var(--ht-muted);
}

/* ---- Price boxes on the quick clinic form ---- */

.ht-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.1rem 0 0.35rem 2.7rem;
}

.ht-price-row .form-control {
    max-width: 7rem;
}

.ht-price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ht-muted);
}

.ht-price-unit {
    color: var(--ht-muted);
}

@media (max-width: 400px) {
    .ht-price-row {
        margin-left: 0;
    }
}

/* ---------- The booking page ----------
   Reached only from the link in a confirmation email. It is the whole relationship with
   somebody who never made an account, so it states what was booked and offers one way out. */

.ht-booking-head {
    text-align: center;
}

.ht-booking-head h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0.6rem;
}

.ht-booking-head p {
    color: var(--ht-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ht-booking-head.confirmed {
    border-top: 4px solid var(--ht-green);
}

.ht-booking-head.cancelled {
    border-top: 4px solid #adb5bd;
}

.ht-booking-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.5rem;
    background: var(--ht-ice);
}

.ht-booking-head.confirmed .ht-booking-icon {
    background: #e3f5ea;
    color: var(--ht-green);
}

.ht-booking-date {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--ht-hairline);
}

.ht-booking-date:last-of-type {
    border-bottom: 0;
}

.ht-booking-date.off .ht-booking-date-main {
    text-decoration: line-through;
    color: var(--ht-muted);
}

.ht-booking-date.past {
    opacity: 0.6;
}

.ht-booking-date-main {
    font-weight: 600;
}

.ht-booking-date-meta {
    font-size: 0.85rem;
    color: var(--ht-muted);
    line-height: 1.4;
}

/* Confirmation code and amount, side by side — the two things read off a phone at the rink. */
.ht-booking-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 1rem 0 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ht-hairline);
}

.ht-booking-fact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ht-muted);
}

.ht-booking-fact-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ht-navy);
    font-variant-numeric: tabular-nums;
}

.btn-danger {
    background: var(--ht-red);
    border-color: var(--ht-red);
    color: #fff;
}

.btn-danger:hover, .btn-danger:focus {
    background: #8f222c;
    border-color: #8f222c;
    color: #fff;
}

/* A standing note inside a form — the age range a guest has to judge for themselves. */
.ht-note {
    margin-top: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: #fff8e6;
    border-radius: var(--ht-radius);
    font-size: 0.88rem;
    line-height: 1.45;
    color: #6b5200;
}

/* Taking a clinic down. Set apart deliberately — these are the two actions on the page
   that cannot be undone by pressing the same button again. */
.ht-danger {
    border-top: 3px solid var(--ht-red);
}

.ht-danger .ht-card-title {
    color: var(--ht-red);
}

.ht-danger ul {
    padding-left: 1.1rem;
    margin-bottom: 0.9rem;
}

.ht-danger ul li {
    margin-bottom: 0.2rem;
}
