.pfgt-public {
    --pfgt-line: rgba(15, 23, 42, 0.12);
    --pfgt-ink: #111827;
    --pfgt-muted: #667085;
    font-family: inherit;
    color: var(--pfgt-ink);
    margin: 24px 0;
}

.pfgt-public * {
    box-sizing: border-box;
}

.pfgt-public-topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    padding: clamp(22px, 4vw, 36px);
    border-radius: 30px 30px 0 0;
    background:
        radial-gradient(circle at 86% 14%, rgba(0, 168, 216, 0.28), transparent 28%),
        linear-gradient(135deg, #071a3d 0%, #173066 54%, #33136a 100%);
    color: #fff;
    box-shadow: 0 18px 44px rgba(8, 27, 60, 0.18);
}

.pfgt-public-kicker {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 900;
    color: #8de7ff;
}

.pfgt-public-topbar h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.pfgt-month-picker {
    display: grid;
    gap: 8px;
    min-width: min(280px, 100%);
    font-weight: 800;
    color: rgba(255,255,255,0.86);
}

.pfgt-month-picker span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pfgt-month-picker select {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 16px;
    padding: 14px 42px 14px 16px;
    min-height: 52px;
    background:
        linear-gradient(45deg, transparent 50%, #0f172a 50%) right 18px center/8px 8px no-repeat,
        rgba(255,255,255,0.96);
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.pfgt-grid-shell {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-top: 0;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 18px 44px rgba(15,23,42,0.08);
    overflow: hidden;
}

.pfgt-grid-heading {
    padding: 22px clamp(18px, 3vw, 30px);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-bottom: 1px solid rgba(15,23,42,0.08);
}

.pfgt-grid-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
    color: var(--pfgt-ink);
    font-weight: 900;
}

.pfgt-grid-heading p {
    margin: 0;
    color: var(--pfgt-muted);
    font-weight: 650;
}

.pfgt-grid-eyebrow {
    color: #0077a3;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 900;
    font-size: 12px;
}

.pfgt-scroll-wrap {
    overflow: auto;
    background:
        linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 22px),
        linear-gradient(270deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 22px),
        #f8fafc;
}

.pfgt-grid {
    min-width: 980px;
    display: grid;
    grid-template-columns: 86px repeat(var(--pfgt-days), minmax(160px, 1fr));
    grid-template-rows: 58px repeat(var(--pfgt-slots), 34px);
    position: relative;
    isolation: isolate;
}

.pfgt-grid-corner,
.pfgt-day-header,
.pfgt-time-label,
.pfgt-slot {
    border-right: 1px solid var(--pfgt-line);
    border-bottom: 1px solid var(--pfgt-line);
}

.pfgt-grid-corner,
.pfgt-day-header {
    position: sticky;
    top: 0;
    z-index: 7;
    background: #071a3d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.pfgt-grid-corner,
.pfgt-time-label {
    position: sticky;
    left: 0;
}

.pfgt-grid-corner {
    z-index: 9;
}

.pfgt-time-label {
    z-index: 3;
    background: #f1f5f9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pfgt-slot {
    background: #fff;
    min-height: 0;
}

.pfgt-class-card {
    z-index: 5;
    margin: 3px 5px;
    border-radius: 15px;
    padding: 10px 11px;
    background: var(--pfgt-card-bg, #061b55);
    color: var(--pfgt-card-text, #fff);
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.13;
    min-height: 0;
}

.pfgt-class-card strong {
    color: inherit;
    font-size: 14px;
    font-weight: 900;
}

.pfgt-class-time,
.pfgt-class-meta,
.pfgt-class-notes {
    color: inherit;
    opacity: .9;
    font-size: 11px;
    font-weight: 700;
}

.pfgt-class-notes {
    margin-top: 2px;
    opacity: .78;
}

.pfgt-empty-state {
    margin: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed rgba(15,23,42,0.18);
    color: #475467;
    font-weight: 750;
}

@media (max-width: 760px) {
    .pfgt-public-topbar,
    .pfgt-grid-heading {
        display: block;
    }
    .pfgt-month-picker {
        margin-top: 18px;
    }
    .pfgt-grid {
        min-width: 760px;
        grid-template-columns: 72px repeat(var(--pfgt-days), minmax(135px, 1fr));
        grid-template-rows: 52px repeat(var(--pfgt-slots), 32px);
    }
}

.pfgt-is-frontend .pfgt-grid {
    grid-template-rows: 50px repeat(var(--pfgt-slots), minmax(62px, auto));
}

.pfgt-hour-cell {
    min-height: 62px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.pfgt-hour-cell.pfgt-has-classes {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pfgt-hour-cell .pfgt-class-card {
    margin: 0;
    width: 100%;
    box-shadow: 0 8px 18px rgba(15,23,42,0.14);
}

.pfgt-hour-cell .pfgt-class-card + .pfgt-class-card {
    margin-top: 0;
}

@media (max-width: 760px) {
    .pfgt-is-frontend .pfgt-grid {
        grid-template-rows: 48px repeat(var(--pfgt-slots), minmax(58px, auto));
    }
}


/* Exact front-end start-time rows */
.pfgt-time-label-custom {
    background: #e0f2fe;
    color: #0369a1;
    box-shadow: inset 4px 0 0 #0ea5e9;
}

.pfgt-time-cell,
.pfgt-hour-cell {
    min-height: 62px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.pfgt-time-cell.pfgt-has-classes,
.pfgt-hour-cell.pfgt-has-classes {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pfgt-custom-time-cell {
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.pfgt-time-cell .pfgt-class-card,
.pfgt-hour-cell .pfgt-class-card {
    margin: 0;
    width: 100%;
    box-shadow: 0 5px 13px rgba(15,23,42,0.13);
}

.pfgt-time-cell .pfgt-class-card + .pfgt-class-card,
.pfgt-hour-cell .pfgt-class-card + .pfgt-class-card {
    margin-top: 0;
}

.pfgt-mobile-schedule {
    display: none;
}

@media (max-width: 820px) {
    .pfgt-public {
        margin: 14px 0;
    }

    .pfgt-public-topbar {
        display: block;
        padding: 22px 18px;
        border-radius: 22px 22px 0 0;
    }

    .pfgt-public-topbar h2 {
        font-size: clamp(28px, 10vw, 40px);
    }

    .pfgt-month-picker {
        margin-top: 18px;
        min-width: 0;
    }

    .pfgt-grid-heading {
        display: block;
        padding: 18px;
    }

    .pfgt-grid-heading p {
        margin-top: 8px;
    }

    .pfgt-scroll-wrap {
        display: none;
    }

    .pfgt-mobile-schedule {
        display: grid;
        gap: 14px;
        padding: 14px;
        background: #f8fafc;
    }

    .pfgt-mobile-day {
        background: #fff;
        border: 1px solid rgba(15,23,42,0.09);
        border-radius: 20px;
        padding: 14px;
        box-shadow: 0 12px 26px rgba(15,23,42,0.07);
    }

    .pfgt-mobile-day h3 {
        margin: 0 0 12px;
        color: #071a3d;
        font-size: 18px;
        font-weight: 900;
        letter-spacing: -0.02em;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .pfgt-mobile-day h3::before {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: #00a8d8;
        box-shadow: 0 0 0 5px rgba(0,168,216,0.12);
        flex: 0 0 auto;
    }

    .pfgt-mobile-class-list {
        display: grid;
        gap: 10px;
    }

    .pfgt-mobile-class-card {
        margin: 0;
        min-height: 0;
        padding: 14px;
        border-radius: 18px;
        box-shadow: 0 10px 22px rgba(15,23,42,0.16);
    }

    .pfgt-mobile-class-card strong {
        font-size: 17px;
    }

    .pfgt-mobile-class-card .pfgt-class-time,
    .pfgt-mobile-class-card .pfgt-class-meta,
    .pfgt-mobile-class-card .pfgt-class-notes {
        font-size: 12px;
    }

    .pfgt-mobile-empty {
        margin: 0;
        color: #667085;
        font-weight: 750;
        background: #f8fafc;
        border: 1px dashed rgba(15,23,42,0.14);
        border-radius: 14px;
        padding: 12px;
    }

    .pfgt-empty-state {
        margin: 14px;
    }
}

/* v1.0.3: front-end timetable always fits its visible container, without horizontal scrolling. */
.pfgt-is-frontend .pfgt-scroll-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    background: #f8fafc;
}

.pfgt-is-frontend .pfgt-grid {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    grid-template-columns: clamp(44px, 8vw, 86px) repeat(var(--pfgt-days), minmax(0, 1fr));
}

.pfgt-is-frontend .pfgt-grid-corner,
.pfgt-is-frontend .pfgt-day-header,
.pfgt-is-frontend .pfgt-time-label,
.pfgt-is-frontend .pfgt-slot,
.pfgt-is-frontend .pfgt-time-cell,
.pfgt-is-frontend .pfgt-hour-cell,
.pfgt-is-frontend .pfgt-class-card {
    min-width: 0;
}

.pfgt-is-frontend .pfgt-day-header {
    text-align: center;
    padding: 0 6px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.pfgt-is-frontend .pfgt-class-card {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}

@media (max-width: 820px) {
    .pfgt-is-frontend .pfgt-scroll-wrap {
        display: block;
    }

    .pfgt-is-frontend .pfgt-mobile-schedule {
        display: none;
    }

    .pfgt-is-frontend .pfgt-grid {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        grid-template-columns: clamp(38px, 11vw, 58px) repeat(var(--pfgt-days), minmax(0, 1fr));
        grid-template-rows: 40px repeat(var(--pfgt-slots), minmax(52px, auto));
    }

    .pfgt-is-frontend .pfgt-grid-corner,
    .pfgt-is-frontend .pfgt-day-header {
        font-size: clamp(9px, 2.5vw, 12px);
        letter-spacing: 0;
        padding: 3px 2px;
    }

    .pfgt-is-frontend .pfgt-time-label {
        font-size: clamp(8px, 2.3vw, 10px);
        padding: 0 1px;
    }

    .pfgt-is-frontend .pfgt-time-cell,
    .pfgt-is-frontend .pfgt-hour-cell {
        min-height: 52px;
        padding: 2px;
        gap: 2px;
    }

    .pfgt-is-frontend .pfgt-class-card {
        margin: 0;
        border-radius: 10px;
        padding: 6px 5px;
        gap: 2px;
        line-height: 1.05;
        box-shadow: 0 5px 12px rgba(15,23,42,0.13);
    }

    .pfgt-is-frontend .pfgt-class-card strong {
        font-size: clamp(10px, 2.8vw, 12px);
        line-height: 1.05;
    }

    .pfgt-is-frontend .pfgt-class-time,
    .pfgt-is-frontend .pfgt-class-meta,
    .pfgt-is-frontend .pfgt-class-notes {
        font-size: clamp(8px, 2.2vw, 10px);
        line-height: 1.05;
    }

    .pfgt-is-frontend .pfgt-class-notes {
        display: none;
    }
}

@media (max-width: 460px) {
    .pfgt-public,
    .pfgt-grid-shell,
    .pfgt-is-frontend .pfgt-scroll-wrap,
    .pfgt-is-frontend .pfgt-grid {
        width: 100%;
        max-width: 100%;
    }

    .pfgt-is-frontend .pfgt-grid {
        grid-template-columns: 37px repeat(var(--pfgt-days), minmax(0, 1fr));
        grid-template-rows: 36px repeat(var(--pfgt-slots), minmax(46px, auto));
    }

    .pfgt-is-frontend .pfgt-grid-corner,
    .pfgt-is-frontend .pfgt-day-header {
        font-size: 9px;
        padding: 2px 1px;
    }

    .pfgt-is-frontend .pfgt-time-label {
        font-size: 8px;
    }

    .pfgt-is-frontend .pfgt-time-cell,
    .pfgt-is-frontend .pfgt-hour-cell {
        min-height: 46px;
        padding: 1px;
        gap: 1px;
    }

    .pfgt-is-frontend .pfgt-class-card {
        border-radius: 8px;
        padding: 5px 3px;
    }

    .pfgt-is-frontend .pfgt-class-card strong {
        font-size: 10px;
    }

    .pfgt-is-frontend .pfgt-class-time {
        font-size: 8px;
    }

    .pfgt-is-frontend .pfgt-class-meta,
    .pfgt-is-frontend .pfgt-class-notes {
        display: none;
    }
}


/* v1.0.4: compact front-end rows to remove unnecessary vertical whitespace. */
.pfgt-is-frontend .pfgt-time-cell,
.pfgt-is-frontend .pfgt-hour-cell {
    min-height: 62px;
    padding: 5px;
    gap: 4px;
}

.pfgt-is-frontend .pfgt-class-card {
    padding: 7px 8px;
    border-radius: 11px;
    gap: 2px;
    line-height: 1.08;
}

.pfgt-is-frontend .pfgt-class-card strong {
    font-size: clamp(10px, 1.15vw, 13px);
    line-height: 1.08;
}

.pfgt-is-frontend .pfgt-class-time,
.pfgt-is-frontend .pfgt-class-meta,
.pfgt-is-frontend .pfgt-class-notes {
    font-size: clamp(8px, 0.95vw, 10px);
    line-height: 1.08;
}

@media (max-width: 820px) {
    .pfgt-is-frontend .pfgt-time-cell,
    .pfgt-is-frontend .pfgt-hour-cell {
        min-height: 52px;
        padding: 2px;
        gap: 2px;
    }

    .pfgt-is-frontend .pfgt-class-card {
        padding: 4px 3px;
        border-radius: 8px;
    }
}

@media (max-width: 460px) {
    .pfgt-is-frontend .pfgt-time-cell,
    .pfgt-is-frontend .pfgt-hour-cell {
        min-height: 46px;
        padding: 1px;
        gap: 1px;
    }

    .pfgt-is-frontend .pfgt-class-card {
        padding: 3px 2px;
        border-radius: 7px;
    }
}


/* v1.0.6: restore the mobile-friendly day-by-day list view on phones/tablets. */
@media (max-width: 820px) {
    .pfgt-is-frontend .pfgt-scroll-wrap {
        display: none !important;
    }

    .pfgt-is-frontend .pfgt-mobile-schedule {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
        background: #f8fafc;
    }

    .pfgt-is-frontend .pfgt-mobile-day {
        background: #fff;
        border: 1px solid rgba(15,23,42,0.09);
        border-radius: 20px;
        padding: 14px;
        box-shadow: 0 12px 26px rgba(15,23,42,0.07);
    }

    .pfgt-is-frontend .pfgt-mobile-day h3 {
        margin: 0 0 12px;
        color: #071a3d;
        font-size: 18px;
        font-weight: 900;
        letter-spacing: -0.02em;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .pfgt-is-frontend .pfgt-mobile-day h3::before {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: #00a8d8;
        box-shadow: 0 0 0 5px rgba(0,168,216,0.12);
        flex: 0 0 auto;
    }

    .pfgt-is-frontend .pfgt-mobile-class-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pfgt-is-frontend .pfgt-mobile-class-card {
        margin: 0;
        min-height: 0;
        width: 100%;
        padding: 13px 14px;
        border-radius: 18px;
        box-shadow: 0 10px 22px rgba(15,23,42,0.16);
    }

    .pfgt-is-frontend .pfgt-mobile-class-card strong {
        font-size: 17px;
        line-height: 1.14;
    }

    .pfgt-is-frontend .pfgt-mobile-class-card .pfgt-class-time,
    .pfgt-is-frontend .pfgt-mobile-class-card .pfgt-class-meta,
    .pfgt-is-frontend .pfgt-mobile-class-card .pfgt-class-notes {
        display: block;
        font-size: 12px;
        line-height: 1.25;
    }

    .pfgt-is-frontend .pfgt-mobile-empty {
        margin: 0;
        color: #667085;
        font-weight: 750;
        background: #f8fafc;
        border: 1px dashed rgba(15,23,42,0.14);
        border-radius: 14px;
        padding: 12px;
    }
}

@media (max-width: 460px) {
    .pfgt-is-frontend .pfgt-mobile-schedule {
        padding: 10px;
        gap: 10px;
    }

    .pfgt-is-frontend .pfgt-mobile-day {
        border-radius: 16px;
        padding: 12px;
    }

    .pfgt-is-frontend .pfgt-mobile-class-card {
        padding: 12px;
        border-radius: 15px;
    }

    .pfgt-is-frontend .pfgt-mobile-class-card strong {
        font-size: 16px;
    }
}
