.schedule-panel {
    margin-top: 22px;
}

.schedule-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.schedule-heading h2 {
    margin: 3px 0 0;
    font-size: 32px;
}

.schedule-summary {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.schedule-summary strong {
    font-size: 34px;
    line-height: 1;
}

.schedule-summary span,
.schedule-legend,
.schedule-time-column span,
.schedule-event span,
.schedule-event small {
    font-size: 11px;
}

.schedule-summary span,
.schedule-legend,
.schedule-time-column span {
    color: var(--muted);
}

.schedule-controls {
    display: flex;
    margin: 22px 0 14px;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.schedule-date-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-date-form input {
    width: auto;
    min-height: 36px;
    padding: 6px 10px;
}

.schedule-legend {
    display: flex;
    margin-bottom: 13px;
    gap: 18px;
    font-size: 12px;
}

.schedule-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-booking {
    border: 1px solid var(--gold);
    background: #ead8b7;
}

.legend-block {
    border: 1px solid #aaa;
    background: #dedede;
}

.vertical-schedule {
    display: grid;
    grid-template-columns: 62px 1fr;
    min-height: var(--schedule-height);
}

.schedule-time-column,
.schedule-track {
    position: relative;
    height: var(--schedule-height);
}

.schedule-time-column span {
    position: absolute;
    right: 10px;
    transform: translateY(-13px);
    font-weight: 700;
}

.schedule-track {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background-color: #fff;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot-height) - 1px), #ebe7e0 calc(var(--slot-height) - 1px), #ebe7e0 var(--slot-height));
}

.schedule-track::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot-height) * 4 - 2px), #d1cbc2 calc(var(--slot-height) * 4 - 2px), #d1cbc2 calc(var(--slot-height) * 4));
    content: "";
    pointer-events: none;
}

.schedule-event {
    position: absolute;
    left: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    overflow: hidden;
    padding: 8px 12px;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1.35;
}

.schedule-event-booking {
    border: 1px solid #c7a66b;
    background: #fff4dc;
    color: var(--black);
    box-shadow: 0 4px 12px rgba(70, 48, 15, .08);
}

.schedule-event-booking:hover {
    background: #f8e7c5;
}

.schedule-event-block {
    z-index: 1;
    border: 1px solid #aaa;
    background: rgba(210, 210, 210, .86);
    color: #555;
}

.schedule-empty {
    position: relative;
    z-index: 1;
    margin: 20px;
    color: var(--muted);
}

tr:target {
    background: #fff5df;
    scroll-margin-top: 20px;
}

.admin-create-panel {
    margin-bottom: 22px;
}

.admin-create-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    font-size: 22px;
    font-weight: 700;
}

.admin-create-panel summary::-webkit-details-marker {
    display: none;
}

.admin-create-panel summary span {
    display: grid;
    gap: 3px;
}

.admin-create-panel summary small,
.field-label {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .14em;
}

.admin-create-panel[open] summary {
    margin-bottom: 20px;
}

.admin-create-panel[open] summary b {
    font-size: 0;
}

.admin-create-panel[open] summary b::after {
    content: "閉じる";
    font-size: 13px;
}

.copy-notice,
.tap-helper {
    padding: 10px 13px;
    border-radius: 10px;
    background: #fff5df;
    color: #6e5428;
    font-size: 13px;
}

.admin-booking-form {
    max-width: 900px;
}

.field-label {
    display: block;
    margin-bottom: 9px;
    color: var(--black);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

.compact-actions,
.table-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.compact-actions form,
.table-actions form {
    margin: 0;
}

.weekly-panel {
    margin-top: 22px;
}

.week-calendar-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.week-calendar {
    display: grid;
    min-width: 1120px;
    grid-template-columns: 64px repeat(7, minmax(145px, 1fr));
    grid-template-rows: 54px var(--week-height);
}

.week-corner,
.week-day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    background: #f8f6f2;
}

.week-corner {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .12em;
}

.week-day-header {
    gap: 7px;
    border-left: 1px solid var(--line);
}

.week-day-header strong {
    font-size: 17px;
}

.week-day-header span {
    color: var(--muted);
    font-size: 12px;
}

.week-day-header.is-today {
    background: #fff1d6;
}

.week-time-column,
.week-day-track {
    position: relative;
    height: var(--week-height);
}

.week-time-column span {
    position: absolute;
    right: 9px;
    transform: translateY(-7px);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.week-day-track {
    overflow: hidden;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    cursor: crosshair;
    background-color: #fff;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--week-slot-height) - 1px), #eeeae4 calc(var(--week-slot-height) - 1px), #eeeae4 var(--week-slot-height));
}

.week-day-track::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--week-slot-height) * 4 - 2px), #d5d0c8 calc(var(--week-slot-height) * 4 - 2px), #d5d0c8 calc(var(--week-slot-height) * 4));
    content: "";
    pointer-events: none;
}

.week-event {
    left: 4px;
    right: 4px;
    padding: 5px 7px;
    border-radius: 8px;
}

.week-event strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.week-event span,
.week-event small {
    overflow: hidden;
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedule-click-track {
    cursor: crosshair;
}

.calendar-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.calendar-actions p {
    display: grid;
    margin: 0 0 12px;
    gap: 4px;
}

.calendar-actions p small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.calendar-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.calendar-button {
    display: flex;
    min-height: 48px;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--black);
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.apple-calendar {
    background: var(--black);
    color: #fff;
}

.google-calendar {
    border-color: #4285f4;
    color: #1769d2;
}

.complete-page .calendar-actions {
    width: min(100%, 560px);
    margin-right: auto;
    margin-left: auto;
}

.service-quantity-card {
    display: flex;
    min-height: 82px;
    padding: 14px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.service-information {
    display: grid;
    gap: 2px;
}

.service-information small {
    font-size: 11px;
}

.quantity-control {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 36px 42px 36px;
    align-items: center;
}

.quantity-control button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #f7f5f1;
    color: var(--black);
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}

.quantity-control input {
    min-width: 0;
    padding: 5px 2px;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    appearance: textfield;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.customer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.customer-booking-list {
    margin-bottom: 22px;
}

.customer-booking-list .section-row h2 {
    margin-bottom: 0;
}

.customer-booking-items {
    display: flex;
    margin-top: 18px;
    flex-direction: column;
    gap: 9px;
}

.customer-booking-items > .customer-booking-item {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--black);
    text-decoration: none;
}

.customer-booking-items > .customer-booking-item.is-current {
    border-color: var(--gold);
    background: #fff7e8;
}

.customer-booking-items > .customer-booking-item > span {
    display: grid;
    gap: 2px;
}

.customer-booking-items > .customer-booking-item small {
    color: var(--muted);
}

.customer-booking-items > .customer-booking-item b {
    flex: 0 0 auto;
    font-size: 12px;
}

.customer-new-booking {
    display: flex;
    width: 100%;
    margin-top: 22px;
}

.account-login-page .panel {
    margin-top: 20px;
}

.logged-in-customer {
    display: grid;
    padding: 18px 20px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8f5ef;
}

.logged-in-customer span,
.logged-in-customer small {
    color: var(--muted);
}

.logged-in-customer strong {
    font-size: 20px;
}

.account-auth-form h2,
.account-profile h2,
.account-reservations h2,
.account-selected-booking h2,
.account-history h2 {
    margin: 0;
}

.account-auth-form input[name="code"] {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .28em;
}

.account-grid {
    display: grid;
    margin-bottom: 22px;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 22px;
}

.account-profile dl,
.account-selected-booking dl {
    margin: 18px 0 0;
}

.account-profile dl > div,
.account-selected-booking dl > div {
    display: grid;
    padding: 15px 0;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    border-top: 1px solid var(--line);
}

.account-profile dt,
.account-selected-booking dt {
    color: var(--muted);
}

.account-profile dd,
.account-selected-booking dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.account-selected-booking,
.account-change-form,
.account-history {
    margin-top: 22px;
}

.account-selected-booking .section-row {
    align-items: center;
}

.account-selected-booking .status-badge {
    margin: 0;
}

.account-cancel-form {
    margin-top: 14px;
}

.history-list {
    display: grid;
    margin-top: 18px;
    gap: 9px;
}

.history-item {
    display: flex;
    padding: 14px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.history-item > span {
    display: grid;
    gap: 2px;
}

.history-item small,
.history-item b {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 760px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-profile dl > div,
    .account-selected-booking dl > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .history-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-create-panel summary {
        font-size: 18px;
    }

    .calendar-actions > div {
        grid-template-columns: 1fr;
    }

    .service-quantity-card {
        padding: 12px;
    }

    .service-information strong {
        font-size: 13px;
    }

    .quantity-control {
        grid-template-columns: 34px 34px 34px;
    }

    .quantity-control button {
        width: 34px;
        height: 34px;
    }

    .customer-booking-items > .customer-booking-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-create-panel summary b {
        font-size: 12px;
    }

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

    .week-calendar {
        min-width: 1040px;
    }

    .compact-item {
        align-items: flex-start;
        gap: 12px;
    }

    .compact-actions,
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .schedule-heading {
        align-items: flex-start;
    }

    .schedule-heading h2 {
        font-size: 26px;
    }

    .schedule-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .schedule-controls > a {
        width: 100%;
    }

    .schedule-date-form {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .schedule-date-form input {
        min-width: 0;
        flex: 1;
    }

    .vertical-schedule {
        grid-template-columns: 49px 1fr;
    }

    .schedule-event {
        left: 6px;
        right: 6px;
        padding: 7px 9px;
    }

    .schedule-event small {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

/* BODY SHIFT AZABU WEEKLY RESERVATION CALENDAR v1 */
.booking-calendar-panel {
    overflow: hidden;
}

.reservation-calendar {
    margin-top: 4px;
}

.reservation-calendar__toolbar {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.reservation-calendar__toolbar strong {
    text-align: center;
    font-size: 18px;
}

.reservation-calendar__nav {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--black);
    cursor: pointer;
}

.reservation-calendar__nav:last-child {
    justify-self: end;
}

.reservation-calendar__nav:disabled {
    opacity: .35;
    cursor: default;
}

.reservation-calendar__selected {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #f8f5ef;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.reservation-calendar__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.reservation-calendar__grid {
    display: grid;
    min-width: 760px;
    grid-template-columns: 70px repeat(7, minmax(84px, 1fr));
}

.reservation-calendar__corner,
.reservation-calendar__day {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 62px;
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    text-align: center;
}

.reservation-calendar__corner {
    left: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
}

.reservation-calendar__day {
    border-left: 1px solid var(--line);
}

.reservation-calendar__day span,
.reservation-calendar__day small {
    display: block;
}

.reservation-calendar__day span {
    font-weight: 700;
}

.reservation-calendar__day small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
}

.reservation-calendar__day.is-saturday span,
.reservation-calendar__day.is-saturday small {
    color: #4775a8;
}

.reservation-calendar__day.is-sunday span,
.reservation-calendar__day.is-sunday small {
    color: #b75b5b;
}

.reservation-calendar__day.is-outside {
    opacity: .38;
}

.reservation-calendar__time {
    position: sticky;
    left: 0;
    z-index: 1;
    display: grid;
    min-height: 44px;
    place-items: center;
    border-bottom: 1px solid #eee9e1;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.reservation-calendar__cell {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-left: 1px solid #eee9e1;
    border-bottom: 1px solid #eee9e1;
}

.reservation-calendar__slot {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gold);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, color .12s ease;
}

.reservation-calendar__slot:hover {
    transform: scale(1.08);
    background: #f7f1e7;
}

.reservation-calendar__slot.is-selected {
    background: var(--gold);
    color: #fff;
}

.reservation-calendar__unavailable {
    color: #c9c4bc;
    font-size: 15px;
}

.reservation-calendar__legend {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
}

.legend-circle {
    color: var(--gold);
}

.legend-cross {
    color: #c9c4bc;
}

@media (max-width: 760px) {
    .booking-calendar-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .reservation-calendar__toolbar {
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
    }

    .reservation-calendar__toolbar strong {
        font-size: 15px;
    }

    .reservation-calendar__nav {
        padding: 8px 9px;
        font-size: 11px;
    }

    .reservation-calendar__grid {
        min-width: 680px;
        grid-template-columns: 58px repeat(7, 89px);
    }

    .reservation-calendar__corner,
    .reservation-calendar__day {
        min-height: 58px;
    }

    .reservation-calendar__time,
    .reservation-calendar__cell {
        min-height: 42px;
    }

    .reservation-calendar__slot {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}