/* Wide, theme-independent layout and responsive corrections. */
.tachi-booking {
    --tb-orange: #FE5827;
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
    margin: 24px 0;
    overflow-x: clip;
    container-type: inline-size;
}

.tachi-booking *,
.tachi-booking *::before,
.tachi-booking *::after {
    box-sizing: border-box;
    min-width: 0;
}

.tachi-booking .tachi-shell {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.6fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tachi-booking .tachi-hero,
.tachi-booking .tachi-panel {
    min-width: 0;
    max-width: 100%;
    min-height: 0 !important;
    height: auto !important;
}

.tachi-booking .tachi-panel {
    overflow: hidden;
}

.tachi-booking .tachi-filters,
.tachi-booking .tachi-dates {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.tachi-booking .tachi-services {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.tachi-booking .tachi-service {
    width: 100%;
}

/* Override aggressive theme button styles for maximum legibility. */
.tachi-booking button.tachi-back,
.tachi-booking button.tachi-back:hover,
.tachi-booking button.tachi-back:focus,
.tachi-booking button.tachi-back:active {
    width: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #20201e !important;
    box-shadow: none !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.tachi-booking button.tachi-back:hover,
.tachi-booking button.tachi-back:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

.tachi-booking button.tachi-service,
.tachi-booking button.tachi-service:hover,
.tachi-booking button.tachi-service:focus,
.tachi-booking button.tachi-service:active {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #ded8d3 !important;
    background: #fff !important;
    color: #20201e !important;
    box-shadow: none !important;
    opacity: 1 !important;
    white-space: normal !important;
    overflow: hidden !important;
}

.tachi-booking button.tachi-service:hover,
.tachi-booking button.tachi-service:focus-visible {
    border-color: #77706b !important;
    box-shadow: 0 8px 22px rgba(32, 32, 30, .08) !important;
}

.tachi-booking button.tachi-service b {
    display: block !important;
    max-width: 100% !important;
    color: #20201e !important;
    opacity: 1 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.35 !important;
}

.tachi-booking button.tachi-service small {
    display: block !important;
    color: #625d59 !important;
    opacity: 1 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.tachi-booking button.tachi-service > i {
    flex: 0 0 auto !important;
    color: #20201e !important;
    opacity: 1 !important;
}

.tachi-booking button.tachi-service .tachi-service-mark {
    display: none !important;
}

.tachi-booking button.tachi-service > span:nth-child(2) {
    display: flex !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-direction: column !important;
    white-space: normal !important;
}

.tachi-booking .tachi-entry-grid,
.tachi-booking .tachi-gender-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tachi-booking .tachi-entry-grid .tachi-choice-card {
    display: flex;
    min-height: 140px;
    flex-direction: column;
    justify-content: center;
}

.tachi-booking .tachi-choice-card {
    appearance: none;
    width: 100%;
    min-height: 180px;
    padding: 24px 18px;
    border: 1px solid var(--tb-line);
    border-radius: 18px;
    background: #fff;
    color: var(--tb-dark);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.tachi-booking .tachi-choice-card:hover,
.tachi-booking .tachi-choice-card:focus-visible {
    border-color: var(--tb-orange);
    outline: 0;
    box-shadow: 0 12px 30px rgba(254, 88, 39, .12);
    transform: translateY(-3px);
}

.tachi-booking .tachi-choice-card > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 28px;
    place-items: center;
    border-radius: 50%;
    background: #fff0e7;
    color: var(--tb-orange);
    font-size: 21px;
}

.tachi-booking .tachi-choice-card b,
.tachi-booking .tachi-choice-card small {
    display: block;
}

.tachi-booking .tachi-choice-card b {
    margin-bottom: 6px;
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 500;
}

.tachi-booking .tachi-choice-card small {
    color: var(--tb-muted);
    font-size: 11px;
    line-height: 1.45;
}

.tachi-booking .tachi-gender-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 560px;
}

.tachi-booking .tachi-service b,
.tachi-booking .tachi-summary b,
.tachi-booking .tachi-summary p {
    overflow-wrap: anywhere;
}

.tachi-booking .tachi-slot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 960px) {
    .tachi-booking {
        width: 100%;
    }

    .tachi-booking .tachi-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .tachi-booking .tachi-hero {
        min-height: auto;
        padding: 34px 34px 82px;
    }

    .tachi-booking .tachi-hero h2 {
        max-width: 560px;
        margin: 34px 0 14px;
        font-size: 43px;
    }

    .tachi-booking .tachi-hero p {
        max-width: 560px;
        margin-bottom: 0;
    }

    .tachi-booking .tachi-progress {
        right: 34px;
        bottom: 27px;
        left: 34px;
    }

    .tachi-booking .tachi-panel {
        min-height: 610px;
        padding: 38px 36px;
    }
}

@media (max-width: 640px) {
    .tachi-booking {
        width: 100%;
        margin: 8px 0;
    }

    .tachi-booking .tachi-shell {
        border-radius: 18px;
    }

    .tachi-booking .tachi-hero {
        min-height: 0 !important;
        padding: 22px 18px 64px !important;
    }

    .tachi-booking .tachi-hero h2 {
        margin: 25px 0 12px;
        font-size: 36px;
        line-height: 1.02;
    }

    .tachi-booking .tachi-hero p {
        font-size: 14px;
        line-height: 1.55;
    }

    .tachi-booking .tachi-progress {
        right: 18px !important;
        bottom: 17px !important;
        left: 18px !important;
    }

    .tachi-booking .tachi-progress span {
        width: 28px;
        height: 28px;
    }

    .tachi-booking .tachi-panel {
        min-height: 570px;
        padding: 24px 16px !important;
    }

    .tachi-booking .tachi-step-head h3 {
        font-size: 29px;
        line-height: 1.08;
    }

    .tachi-booking .tachi-step-head p {
        margin-bottom: 21px;
        font-size: 13px;
    }

    .tachi-booking .tachi-services {
        grid-template-columns: minmax(0, 1fr);
        max-height: none;
        padding-right: 2px;
        overflow: visible;
    }

    .tachi-booking .tachi-entry-grid,
    .tachi-booking .tachi-gender-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px !important;
    }

    .tachi-booking .tachi-choice-card {
        min-height: 0;
        padding: 17px;
    }

    .tachi-booking .tachi-choice-card > span {
        width: 40px;
        height: 40px;
        margin-bottom: 14px;
        font-size: 17px;
    }

    .tachi-booking .tachi-entry-grid .tachi-choice-card {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 14px 16px !important;
        border-radius: 13px !important;
        background: #fff !important;
        color: #20201e !important;
        text-align: left !important;
    }

    .tachi-booking .tachi-entry-grid .tachi-choice-card b {
        margin: 0 0 3px !important;
        color: #20201e !important;
        font-size: 21px !important;
        line-height: 1.15 !important;
    }

    .tachi-booking .tachi-entry-grid .tachi-choice-card small {
        margin: 0 !important;
        color: #625d59 !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .tachi-booking .tachi-service {
        padding: 13px 12px;
    }

    .tachi-booking .tachi-dates button {
        min-width: 59px;
    }

    .tachi-booking .tachi-slot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
    }

    .tachi-booking .tachi-field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .tachi-booking .tachi-summary {
        align-items: flex-start;
    }

    .tachi-booking .tachi-success {
        padding: 22px 2px;
    }

    .tachi-booking .tachi-success h3 {
        font-size: 34px;
    }
}

@media (max-width: 360px) {
    .tachi-booking .tachi-slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tachi-booking .tachi-panel {
        padding-right: 14px;
        padding-left: 14px;
    }

    .tachi-booking .tachi-hero h2 {
        font-size: 32px;
    }
}

/* Also respond to the actual WordPress content column, not only the viewport. */
@container (max-width: 760px) {
    .tachi-booking .tachi-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .tachi-booking .tachi-hero {
        min-height: auto;
        padding: 30px 26px 78px;
    }

    .tachi-booking .tachi-hero h2 {
        max-width: none;
        margin: 28px 0 13px;
        font-size: 40px;
    }

    .tachi-booking .tachi-progress {
        right: 26px;
        bottom: 25px;
        left: 26px;
    }

    .tachi-booking .tachi-panel {
        min-height: 590px;
        padding: 34px 26px;
    }
}

@container (max-width: 560px) {
    .tachi-booking .tachi-entry-grid,
    .tachi-booking .tachi-gender-grid,
    .tachi-booking .tachi-services {
        grid-template-columns: minmax(0, 1fr);
    }

    .tachi-booking .tachi-choice-card {
        min-height: 0;
        padding: 17px;
    }

    .tachi-booking .tachi-choice-card > span {
        margin-bottom: 14px;
    }

    .tachi-booking .tachi-entry-grid {
        gap: 8px !important;
    }

    .tachi-booking .tachi-entry-grid .tachi-choice-card {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 14px 16px !important;
    }

    .tachi-booking .tachi-slot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tachi-booking .tachi-field-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Let short mobile steps end immediately after their content. */
@media (max-width: 640px) {
    .tachi-booking .tachi-panel {
        min-height: 0 !important;
        height: auto !important;
    }
}

@container (max-width: 640px) {
    .tachi-booking .tachi-panel {
        min-height: 0 !important;
        height: auto !important;
    }
}

/* Content must be the sole source of component height. */
.tachi-booking,
.tachi-booking .tachi-shell,
.tachi-booking .tachi-hero,
.tachi-booking .tachi-panel,
.tachi-booking .tachi-entry-grid,
.tachi-booking .tachi-gender-grid,
.tachi-booking .tachi-services {
    min-height: 0 !important;
    height: auto !important;
}

@media (max-width: 640px) {
    .tachi-booking .tachi-shell {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .tachi-booking .tachi-hero,
    .tachi-booking .tachi-panel {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        align-self: start !important;
    }

    .tachi-booking .tachi-entry-grid,
    .tachi-booking .tachi-gender-grid,
    .tachi-booking .tachi-services {
        height: auto !important;
        min-height: 0 !important;
        align-items: start !important;
        align-content: start !important;
    }
}

@container (max-width: 640px) {
    .tachi-booking .tachi-shell {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
    }
}
