.manabi-reservation {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 12px;
}

.manabi-reservation h2,
.manabi-reservation h3 {
    margin-top: 24px;
    margin-bottom: 16px;
}

.manabi-message {
    padding: 12px 14px;
    margin-bottom: 20px;
    background: #f0f8ff;
    border-left: 4px solid #2271b1;
}

.manabi-error {
    padding: 12px 14px;
    margin: 16px 0;
    background: #fff2f2;
    border-left: 4px solid #cc1818;
}

.manabi-table-scroll {
    overflow-x: auto;
}

.manabi-reservation-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.manabi-reservation-table th,
.manabi-reservation-table td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: middle;
}

.manabi-reservation-table th {
    background: #f7f7f7;
    font-weight: bold;
}

.manabi-inline-form,
.manabi-check-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.manabi-inline-form select,
.manabi-inline-form input,
.manabi-check-form select,
.manabi-check-form input {
    padding: 7px;
    min-height: 36px;
}

.manabi-inline-form button,
.manabi-check-form button,
.manabi-cancel-button {
    padding: 7px 12px;
    min-height: 36px;
    border: 0;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    border-radius: 3px;
}

.manabi-inline-form button:hover,
.manabi-check-form button:hover {
    opacity: 0.9;
}

.manabi-cancel-button {
    background: #cc1818;
}

.manabi-full {
    font-weight: bold;
    color: #cc1818;
}

.manabi-my-reservations {
    margin-top: 16px;
}

@media (max-width: 700px) {
    .manabi-inline-form,
    .manabi-check-form {
        display: block;
    }

    .manabi-inline-form select,
    .manabi-inline-form input,
    .manabi-inline-form button,
    .manabi-check-form select,
    .manabi-check-form input,
    .manabi-check-form button {
        width: 100%;
        margin: 4px 0;
    }
}

/* Ver1.1 calendar view */
.manabi-calendar {
    display: grid;
    gap: 18px;
}

.manabi-day-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.manabi-day-card h4 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #9b1b3d;
    font-size: 18px;
}

.manabi-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.manabi-slot-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
}

.manabi-slot-card.is-full {
    background: #f7f7f7;
    opacity: 0.85;
}

.manabi-slot-time {
    font-weight: bold;
    margin-bottom: 8px;
}

.manabi-seat-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 13px;
}

.manabi-seat-badge.is-many {
    background: #e7f7ec;
    color: #137333;
}

.manabi-seat-badge.is-medium {
    background: #fff4d6;
    color: #8a5a00;
}

.manabi-seat-badge.is-low,
.manabi-seat-badge.is-full {
    background: #fde8e8;
    color: #b42318;
}

.manabi-card-form {
    display: grid;
    gap: 7px;
}

.manabi-card-form select,
.manabi-card-form input {
    width: 100%;
    padding: 8px;
    min-height: 38px;
}

.manabi-card-form button {
    width: 100%;
    padding: 9px 12px;
    min-height: 38px;
    border: 0;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.manabi-full-text {
    color: #b42318;
    font-weight: bold;
}

.manabi-count-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.manabi-count-summary div {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px;
}

.manabi-count-summary span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.manabi-count-summary strong {
    font-size: 22px;
}

@media (max-width: 700px) {
    .manabi-day-card {
        padding: 12px;
    }

    .manabi-slot-grid {
        grid-template-columns: 1fr;
    }
}

/* Ver1.2 date tabs / reserved display */
.manabi-date-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.manabi-date-tab {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 999px;
    padding: 8px 13px;
    cursor: pointer;
    font-weight: bold;
}

.manabi-date-tab.is-active {
    background: #9b1b3d;
    border-color: #9b1b3d;
    color: #fff;
}

.manabi-date-panel {
    display: none;
}

.manabi-date-panel.is-active {
    display: block;
}

.manabi-slot-card.is-reserved-by-me {
    border-color: #137333;
    background: #f4fbf6;
}

.manabi-reserved-mark {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #137333;
    color: #fff;
    font-weight: bold;
}

.manabi-slot-card.is-full .manabi-card-form,
.manabi-slot-card.is-reserved-by-me .manabi-card-form {
    display: none;
}

@media (max-width: 700px) {
    .manabi-date-tabs {
        gap: 6px;
        padding: 8px;
    }

    .manabi-date-tab {
        padding: 7px 10px;
        font-size: 14px;
    }
}

/* Ver1.2.1 month calendar */
.manabi-month-calendars {
    display: grid;
    gap: 16px;
    margin: 14px 0 20px;
}

.manabi-month-calendar {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px;
}

.manabi-month-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.manabi-calendar-weekdays,
.manabi-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.manabi-calendar-weekdays div {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    padding: 4px 0;
}

.manabi-calendar-cell {
    min-height: 64px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    padding: 7px;
    text-align: left;
    color: #333;
}

button.manabi-calendar-cell {
    cursor: pointer;
    transition: 0.15s ease;
}

button.manabi-calendar-cell:hover {
    border-color: #9b1b3d;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}

.manabi-calendar-cell.is-active {
    background: #9b1b3d;
    border-color: #9b1b3d;
    color: #fff;
}

.manabi-calendar-cell.is-disabled {
    background: #f7f7f7;
    color: #bbb;
}

.manabi-calendar-cell.is-empty {
    border: 0;
    background: transparent;
}

.manabi-calendar-cell.is-full-day:not(.is-active) {
    background: #fff5f5;
    border-color: #f0b8b8;
}

.manabi-calendar-day-number {
    display: block;
    font-weight: bold;
    font-size: 16px;
}

.manabi-calendar-day-info {
    display: inline-block;
    margin-top: 7px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e7f7ec;
    color: #137333;
    font-size: 12px;
    font-weight: bold;
}

.manabi-calendar-cell.is-active .manabi-calendar-day-info {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.manabi-calendar-cell.is-full-day:not(.is-active) .manabi-calendar-day-info {
    background: #fde8e8;
    color: #b42318;
}

@media (max-width: 700px) {
    .manabi-month-calendar {
        padding: 10px;
    }

    .manabi-calendar-weekdays,
    .manabi-calendar-grid {
        gap: 4px;
    }

    .manabi-calendar-cell {
        min-height: 52px;
        padding: 5px;
        border-radius: 6px;
    }

    .manabi-calendar-day-number {
        font-size: 14px;
    }

    .manabi-calendar-day-info {
        font-size: 11px;
        padding: 1px 5px;
    }
}


/* Ver1.3 calendar symbols and my-reservation mark */
.manabi-calendar-cell.is-available-day:not(.is-active) {
    background: #ffffff;
    border-color: #d9eadf;
}

.manabi-calendar-cell.is-few-day:not(.is-active) {
    background: #fffaf0;
    border-color: #f3d48b;
}

.manabi-calendar-cell.is-full-day:not(.is-active) {
    background: #fff5f5;
    border-color: #f0b8b8;
}

.manabi-calendar-cell.is-reserved-by-me-day:not(.is-active) {
    background: #f0fbf3;
    border-color: #137333;
}

.manabi-calendar-my-mark {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #137333;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.manabi-calendar-cell.is-active .manabi-calendar-my-mark {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.manabi-calendar-cell.is-few-day:not(.is-active) .manabi-calendar-day-info {
    background: #fff0c2;
    color: #8a5a00;
}

.manabi-calendar-cell.is-full-day:not(.is-active) .manabi-calendar-day-info {
    background: #fde8e8;
    color: #b42318;
}

.manabi-calendar-day-info {
    max-width: 100%;
    white-space: nowrap;
}

/* Ver 1.4.1: カレンダー上部の共通入力欄（スマホ優先・縦並び） */
.manabi-reserve-user-panel {
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    background: #fffaf3;
}

.manabi-reserve-user-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.manabi-reserve-user-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.manabi-reserve-user-field label {
    display: block;
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.manabi-reserve-user-fields select,
.manabi-reserve-user-fields input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5df;
    border-radius: 7px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 48px;
    background-color: #fff;
}

.manabi-reserve-user-fields select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manabi-reserve-user-note,
.manabi-card-form-note {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
}

.manabi-card-form-note {
    text-align: center;
}

@media (max-width: 700px) {
    .manabi-reserve-user-panel {
        padding: 12px;
    }

    .manabi-reserve-user-title {
        font-size: 16px;
    }

    .manabi-reserve-user-note,
    .manabi-card-form-note {
        font-size: 12px;
        line-height: 1.6;
    }
}

/* Ver 1.4.2: 名前・パスコード下のコマ数表示 */
.manabi-inline-count-summary {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.manabi-inline-count-summary.is-visible {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.manabi-inline-count-summary div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid #edf2f7;
}

.manabi-inline-count-summary div:last-child {
    border-bottom: none;
}

.manabi-inline-count-summary span {
    color: #555;
    font-weight: 600;
}

.manabi-inline-count-summary strong {
    color: #222;
    font-size: 16px;
}

.manabi-deadline-text {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #666;
    font-weight: 700;
    font-size: 13px;
}

.manabi-full-text small {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}
