.analysis-page {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    background: #fff;
    color: #535353;
}

.analysis-page, 
.analysis-page * {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.analysis-page-header {
    width: 100%;
    padding-inline: 1.25rem;
    margin-top: 24px;
}

.analysis-date-filter {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.analysis-date-range-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 220px;
    position: relative;
    flex-shrink: 0;
}

.analysis-date-range-container label {
    font-size: 0.95rem;
    color: #535353;
}

.analysis-date-range-input {
    width: 100%;
    background-color: #F5F5F5;
    border: none;
    border-radius: 999px;
    color: #535353;
    font-size: 0.95rem;
    margin-bottom: 0;
    margin-top: 0;
    padding: 12px 40px 12px 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.analysis-date-range-container::before {
    border-left: 1px solid #6F6F6F;
    border-top: 1px solid #6F6F6F;
    content: "";
    display: block;
    height: 7px;
    position: absolute;
    right: 20px;
    top: 68%;
    transform: translateY(-50%) rotate(-135deg);
    width: 7px;
    pointer-events: none;
}

.analysis-anchor-links {
    display: flex;
    gap: 10px;
    padding-inline: 1.25rem;
    margin: 20px 0 0;
    flex-wrap: wrap;
}

.analysis-anchor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 10px 16px;
    background: #C5A983;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.875rem;
    line-height: 1;
}

.analysis-message {
    margin: 20px 1.25rem 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.analysis-message.is-error {
    background: #FDECEC;
    color: #B00020;
}

.analysis-message.is-success {
    background: #EDF7ED;
    color: #1B5E20;
}

.analysis-section {
    width: 100%;
    margin-top: 36px;
}

#analysis-average-duration-section {
    padding-inline: 1.25rem;
}

.analysis-section-title {
    margin: 0 0 14px 1.25rem;
    color: #C5A983;
    font-size: 1.25rem;
    font-weight: 700;
}

.analysis-summary-card {
    width: 100%;
    background: #F7F7F7;
    border-radius: 16px;
    padding: 24px 18px;
}

.analysis-summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #535353;
    line-height: 1.2;
}

.analysis-summary-subtext {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #777;
}

.analysis-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.analysis-table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border-radius: 10px;
    overflow: visible;
}

.analysis-table.analysis-table-4col {
    min-width: 760px;
}

.analysis-table.analysis-table-3col {
    min-width: 640px;
}

.analysis-table thead th {
    background: #C5A983;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px;
    border-right: 1px solid rgba(255,255,255,0.35);
    white-space: nowrap;
}

.analysis-table thead th:last-child {
    border-right: none;
}

.analysis-table tbody td {
    font-size: 0.95rem;
    padding: 12px;
    border-top: 1px solid #e6e6e6;
    border-right: 1px solid #e6e6e6;
    background: #fff;
    white-space: nowrap;
}

.analysis-table tbody td:last-child {
    border-right: none;
}

.analysis-table tbody tr:nth-child(even) td {
    background: #f8f8f8;
}

.analysis-total-row td {
    font-weight: 700;
    background: #F0E7DA !important;
}

.analysis-th-name,
.analysis-td-name {
    text-align: left;
    position: sticky;
    left: 0;
    box-shadow: 1px 0 0 #e6e6e6;
}

.analysis-th-number,
.analysis-td-number {
    text-align: right;
}

.analysis-table thead .analysis-th-name {
    z-index: 4;
    background: #C5A983;
}

.analysis-table tbody .analysis-td-name {
    z-index: 3;
    background: #fff;
}

.analysis-table tbody tr:nth-child(even) .analysis-td-name {
    background: #f8f8f8;
}

.analysis-total-row .analysis-td-name {
    background: #F0E7DA !important;
}

.analysis-table-4col .analysis-col-name {
    width: 34%;
    min-width: 180px;
}

.analysis-table-4col .analysis-col-count {
    width: 16%;
    min-width: 100px;
}

.analysis-table-4col .analysis-col-ratio {
    width: 16%;
    min-width: 100px;
}

.analysis-table-4col .analysis-col-amount {
    width: 34%;
    min-width: 180px;
}

.analysis-table-3col .analysis-col-name {
    width: 40%;
    min-width: 160px;
}

.analysis-table-3col .analysis-col-count {
    width: 20%;
    min-width: 100px;
}

.analysis-table-3col .analysis-col-ratio,
.analysis-table-3col .analysis-col-amount {
    width: 40%;
    min-width: 120px;
}

.analysis-empty-cell {
    text-align: center !important;
    color: #777;
    padding: 20px 12px !important;
}

.analysis-loading {
    padding: 20px 12px;
    color: #777;
}

.analysis-sticky-head {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 9999;
    background: transparent;
}

.analysis-sticky-head.is-active {
    display: block;
}

.analysis-sticky-head table {
    margin: 0;
}

.analysis-sticky-head tbody {
    display: none;
}

.analysis-sticky-head .analysis-th-name {
    position: relative;
    z-index: 2;
    background: #C5A983;
    box-shadow: 1px 0 0 rgba(255,255,255,0.35);
}

@media screen and (max-width: 767px) {
    .analysis-date-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .analysis-date-range-container {
        width: 100%;
    }

    .analysis-date-range-input {
        width: 100%;
        min-width: 0;
    }

    .analysis-summary-value {
        font-size: 1.75rem;
    }

    .analysis-table.analysis-table-4col {
        min-width: 700px;
    }

    .analysis-table.analysis-table-3col {
        min-width: 560px;
    }

    .analysis-table-4col .analysis-col-name {
        min-width: 140px;
    }

    .analysis-table-3col .analysis-col-name {
        min-width: 120px;
    }

    .analysis-table-4col .analysis-col-count,
    .analysis-table-4col .analysis-col-ratio,
    .analysis-table-3col .analysis-col-count,
    .analysis-table-3col .analysis-col-ratio {
        min-width: 90px;
    }

    .analysis-table-4col .analysis-col-amount,
    .analysis-table-3col .analysis-col-amount {
        min-width: 120px;
    }
}