*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    margin: auto;
    width: 100%;
    max-width: 1200px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 24px;
    position: relative;
    padding-left: 12px;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px); 
    transition: opacity 0.8s ease, transform 0.8s ease; 
    will-change: opacity, transform;
}

.fade-in-up.is-show {
    opacity: 1;
    transform: translateY(0); 
}

/* .title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: #f32121;
    border-radius: 2px;
} */

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.card-ttl {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.card-text {
    font-size: 15px;
    font-weight: normal !important;
    letter-spacing: 0.05em;
}

.card:hover {
    border-color: #f32121;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 33, 33, 0.15);
}

.card:hover .card-icon img {
    transform: scale(1.05);
}

.shaken-table .th-today{
    background: #FDFBDB !important;
}

/* 車検予約 */
.shaken-system-wrapper {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 24px;
}

.shaken-subtitle {
    font-size: 16px;
    font-weight: bold;
    color: #475569;
    margin-bottom: 20px;
}

.shaken-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.shaken-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #475569;
    transition: all 0.2s;
}

.shaken-btn:hover {
    background: #f1f5f9;
}

.shaken-btn.is-active {
    background: #e2e8f0;
    color: #0f172a;
}

.shaken-pager {
    font-size: 18px;
    font-weight: bold;
    color: #0f172a;
    margin: 0 12px;
}

.shaken-legend {
    font-size: 13px;
    display: flex;
    gap: 12px;
}

.legend-item span {
    font-weight: bold;
    margin-right: 4px;
}

.week-title {
    background: #0f172a;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    letter-spacing: 0.05em;
}

.shaken-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    table-layout: fixed;
}

.shaken-table th, .shaken-table td {
    border: 1px solid #e2e8f0;
    text-align: center;
    font-size: 13px;
    padding: 12px 6px;
    vertical-align: middle;
}

.shaken-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: bold;
}

.shaken-table th.time-col, .shaken-table td.time-cell {
    width: 80px;
    background: #f1f5f9;
    font-weight: bold;
    color: #475569;
}

.slot-box {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    border-radius: 8px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.slot-box:hover {
    background: #dcfce7;
    transform: translateY(-1px);
}

.slot-box.is-few {
    background: #fff7ed;
    border-color: #ea580c;
}

.slot-box.is-few:hover {
    background: #ffedd5;
}

.slot-time {
    font-weight: bold;
    color: #166534;
    margin-bottom: 2px;
}

.slot-box.is-few .slot-time {
    color: #9a3412;
}

.slot-name {
    color: #64748b;
    font-size: 11px;
    margin-bottom: 4px;
}

.status-ok { color: #166534; font-weight: bold; }
.status-few { color: #9a3412; font-weight: bold; }

.slot-closed {
    background: #f1f5f9;
    color: #94a3b8;
    padding: 16px 4px;
    border-radius: 8px;
    font-weight: bold;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: shakenModalIn 0.2s ease-out;
}

@keyframes shakenModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 24px;
    font-weight: bold;
    font-size: 16px;
}

.modal-body {
    padding: 24px;
    font-size: 15px;
}

.modal-row {
    display: flex;
    margin-bottom: 16px;
}

.modal-row:last-child { margin-bottom: 0; }

.modal-label {
    width: 110px;
    font-weight: bold;
    color: #64748b;
}

.modal-value {
    flex: 1;
    color: #0f172a;
}

.modal-footer {
    background: #f8fafc;
    padding: 16px 24px;
    text-align: right;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-submit {
    background: #f32121;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover { background: #dc2626; }
.sp-title { display: none; }

/* 見積りシステム */
.est-container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.est-header {
    background-color: #e68a00;
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* メインコンテンツ（左右の間隔を調整） */
.est-main {
    display: flex;
    padding: 25px;
    gap: 40px;
}

.est-left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.est-right-panel {
    flex: 0.9;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.est-nation-select {
    display: flex;
    gap: 15px;
}

.est-btn-nation {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.est-btn-japan {
    background-color: #fff;
    color: #333;
    border: 2px solid #ccc;
}

.est-btn-japan.est-active {
    border: 2px solid #e68a00;
    color: #0044cc;
}

.est-btn-nation .fa-check {
    color: #e68a00;
    font-size: 18px;
    display: none;
}

.est-btn-nation.est-active .fa-check {
    display: inline-block;
}

.est-btn-import {
    background-color: #f0f4fc;
    color: #0044cc;
    border: 2px solid #0044cc;
}

.est-btn-import.est-active {
    background-color: #dee7f8;
    border: 2px solid #e68a00;
}

.est-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.est-section-title .fa-check {
    color: #e68a00;
    font-size: 16px;
}

.est-select-year {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #777;
    border-radius: 4px;
    background-color: #fff;
}

.est-car-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 220px));
    gap: 15px;
}

.est-car-item {
    border: 2px solid #0055b3;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-size: 20px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    box-sizing: border-box;
    position: relative;
    transition: all 0.2s;
}

.est-car-item.est-active {
    border: 2px solid #e68a00 !important;
}

.est-car-item .fa-check {
    color: #e68a00;
    font-size: 16px;
    position: absolute;
    left: 10px;
    top: 10px;
    display: none;
}
.est-car-item.est-active .fa-check {
    display: block;
}

.est-car-name {
    font-weight: bold;
    color: #0055b3;
    margin-top: 10px;
}

.est-car-desc {
    font-size: 14px;
    font-weight: bold;
    color: #0055b3;
    white-space: pre-line;
    line-height: 1.3;
    margin-top: 12px;
}

.est-car-badge {
    background-color: #0055b3;
    color: #fff;
    font-size: 13px;
    padding: 4px;
    border-radius: 3px;
    margin-top: auto;
}

.est-summary-box {
    border: 1px solid #000;
    font-size: 15px;
}

.est-summary-row {
    display: flex;
    border-bottom: 1px solid #000;
}

.est-summary-row:last-child {
    border-bottom: none;
}

.est-summary-label {
    background-color: #eaeaea;
    width: 80px;
    padding: 8px;
    font-weight: bold;
    border-right: 1px solid #000;
}

.est-summary-value {
    padding: 8px;
    flex: 1;
}

.est-total-box {
    border: 2px solid #e68a00;
    border-radius: 6px;
    padding: 10px 15px;
    position: relative;
}

.est-total-label {
    font-size: 16px;
    font-weight: bold;
}

.est-total-label span {
    color: #ff0000;
}

.est-total-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 5px;
}

.est-total-text {
    font-size: 18px;
    font-weight: bold;
}

.est-total-amount {
    font-size: 26px;
    font-weight: bold;
    color: #000;
}

.est-notes {
    font-size: 13px;
    color: #ff0000;
    line-height: 1.5;
}

.est-notes p {
    margin: 0 0 5px 0;
}

.est-handwritten-note {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
    padding-left: 10px;
    position: relative;
}

.est-handwritten-note::before {
    content: "➔";
    position: absolute;
    left: -5px;
}

.est-detail-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #777;
    font-size: 14px;
}

.est-detail-table th {
    background-color: #cccccc;
    padding: 8px;
    font-weight: bold;
    border: 1px solid #777;
}

.est-detail-table td {
    padding: 6px 10px;
    border: 1px solid #777;
}

.est-detail-table td.est-price-col {
    text-align: right;
}

.est-sub-label {
    font-size: 12px;
    color: #666;
    display: block;
}

.est-btn-reserve {
    background-color: #b32424;
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.est-btn-reserve:hover {
    background-color: #991f1f;
}

@media (max-width: 1000px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .est-main {
        flex-direction: column;
        padding: 16px;
        gap: 24px;
    }

    .est-left-panel,
    .est-right-panel {
        width: 100%;
    }

    .est-car-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .res-top-pd {
        padding: 140px 0 40px 0;
    }
}

@media (max-width: 960px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .shaken-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .shaken-nav > div {
        width: 100%;
    }

    .shaken-legend {
        justify-content: flex-start;
    }

    .est-car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pc-title { 
        display: none; 
    }

    .sp-title { 
        display: block; 
    }

    .week-2 { 
        display: none; 
    }

    .shaken-table th, .shaken-table td {
        padding: 8px 2px;
        font-size: 11px;
    }

    .slot-name { 
        display: none; 
    }

    .slot-time { 
        font-size: 10px; 
    }

    .shaken-nav { 
        flex-direction: column; 
        align-items: stretch; 
    }

    .shaken-legend { 
        justify-content: center; 
    }

    .title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .shaken-system-wrapper {
        padding: 16px;
        border-radius: 12px;
    }

    .shaken-system-wrapper {
        overflow-x: auto;
    }

    .shaken-table {
        min-width: 650px; 
    }

    .shaken-table th, 
    .shaken-table td {
        padding: 6px 2px;
        font-size: 11px;
    }

    .slot-name { 
        display: none; 
    }

    .slot-time { 
        font-size: 10px; 
    }

    .slot-box {
        padding: 6px 2px;
    }

    .modal-content {
        max-width: 90%;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .res-top-pd {
        padding: 100px 0 40px 0;
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 20px;
    }

    .shaken-system-wrapper {
        overflow-x: visible !important;
        padding: 16px 12px;
    }

    .shaken-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        white-space: nowrap !important;
    }

    .shaken-table thead,
    .shaken-table tbody {
        display: table !important;
        width: 100% !important;
        min-width: 650px !important; 
        table-layout: fixed !important;
    }

    .shaken-table tr {
        display: table-row !important;
    }

    .shaken-table th,
    .shaken-table td {
        display: table-cell !important;
        padding: 6px 2px !important;
    }

    .shaken-table th.time-col,
    .shaken-table td.time-cell {
        width: 75px !important;
        min-width: 75px !important;
    }

    .slot-box, 
    .slot-closed {
        padding: 6px 2px !important;
    }

    .slot-time, 
    .status-ok, 
    .status-few {
        font-size: 11px !important;
    }

    .slot-name {
        font-size: 10px !important;
    }

}

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

    .card {
        padding: 16px;
    }

    .card-ttl {
        font-size: 16px;
    }

    .shaken-subtitle {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .shaken-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    #month-input {
        font-size: 0.85rem;
        padding: 2px 6px;
    }

    .shaken-legend {
        font-size: 11px;
        gap: 8px;
    }

    .est-nation-select {
        flex-direction: column;
        gap: 8px;
    }

    .est-car-grid {
        grid-template-columns: 1fr;
    }

    .est-car-item {
        height: auto;
        min-height: 90px;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-label {
        width: 80px;
        font-size: 13px;
    }

    .modal-value {
        font-size: 13px;
    }

    
 
}