:root {
    --cim-primary: #ed1c24;
    --cim-primary-light: rgba(237, 28, 36, 0.08);
    --cim-primary-soft: rgba(237, 28, 36, 0.12);
    --cim-text: #111827;
    --cim-text-muted: #6b7280;
    --cim-text-heading: #374151;
    --cim-border: #e5e7eb;
    --cim-border-light: #f0f0f0;
    --cim-bg: #ffffff;
    --cim-bg-subtle: #f9fafb;
    --cim-bg-muted: #f3f4f6;
    --cim-badge-bg: #f3f4f6;
    --cim-badge-text: #6b7280;
    --cim-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --cim-row-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --cim-radius: 20px;
}

.cim-book-list-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 32px;
    background: var(--cim-bg);
    border-radius: var(--cim-radius);
    box-shadow: var(--cim-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 0.9375rem;
    color: var(--cim-text);
    box-sizing: border-box;
}

.cim-book-list-wrapper *,
.cim-book-list-wrapper *::before,
.cim-book-list-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.cim-book-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.cim-header-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.cim-header-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cim-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cim-header-icon svg {
    width: 24px;
    height: 24px;
}

.cim-header-text {
    min-width: 0;
    padding-top: 2px;
}

.cim-dynamic-title {
    margin: 0 0 4px;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--cim-text);
    letter-spacing: -0.02em;
}

.cim-dynamic-description {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--cim-text-muted);
    line-height: 1.45;
}

.cim-header-divider {
    width: 150px;
    height: 2px;
    margin: 8px 0 0;
    border: none;
    background: var(--cim-primary);
    border-radius: 999px;
}

/* Year filter */
.cim-year-filter {
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 2px;
}

.cim-year-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fff;
    padding: 8px 30px 8px 12px;
    min-width: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.cim-year-select-wrap:hover,
.cim-year-select-wrap:focus-within {
    border-color: #d4d4d8;
}

.cim-calendar-icon {
    width: 16px;
    height: 16px;
    color: var(--cim-primary);
    flex-shrink: 0;
    stroke-width: 1.75;
}

.cim-year-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--cim-text);
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: auto;
    min-width: 3rem;
    outline: none;
    line-height: 1;
}

.cim-chevron-icon {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    color: #71717a;
    pointer-events: none;
    stroke-width: 2;
}
#cim-search{
    max-width: 100% !important;
}
/* Search */
.cim-search-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    margin-bottom: 14px;
}

.cim-book-list-wrapper .cim-search-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 12px;
    height: 40px;
    border: 1px solid var(--cim-border);
    border-radius: 8px;
    background: var(--cim-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cim-book-list-wrapper .cim-search-container:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.cim-book-list-wrapper .cim-search-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    flex: 0 0 14px;
    margin: 0;
}

.cim-book-list-wrapper .cim-search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--cim-text);
    line-height: 1.4;
    padding: 0;
    margin: 0;
    outline: none;
    text-align: left;
}

.cim-book-list-wrapper .cim-search-input::placeholder {
    color: #9ca3af;
    opacity: 1;
    text-align: left;
}

/* Table */
.cim-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cim-book-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 6px;
    min-width: 0;
}

.cim-book-table col.cim-col-number {
    width: 54px;
}

.cim-book-table col.cim-col-title {
    width: 22%;
}

.cim-book-table col.cim-col-author {
    width: 13%;
}

.cim-book-table col.cim-col-topic {
    width: 24%;
}

.cim-book-table col.cim-col-participation {
    width: 18%;
}

.cim-book-table col.cim-col-shop {
    width: 18%;
}

.cim-book-table thead th {
    background: var(--cim-primary-light);
    color: var(--cim-text-heading);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 9px 12px;
    text-align: left;
    border: none;
    white-space: nowrap;
}

.cim-book-table thead th:first-child {
    border-radius: 8px 0 0 8px;
    padding-left: 14px;
}

.cim-book-table thead th:last-child {
    border-radius: 0 8px 8px 0;
    padding-right: 14px;
}

.cim-book-table tbody td {
    padding: 11px 12px;
    vertical-align: middle;
    font-size: 0.875rem;
    line-height: 1.4;
    background: var(--cim-bg);
    border-top: 1px solid var(--cim-border-light);
    border-bottom: 1px solid var(--cim-border-light);
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.cim-book-table tbody tr td:first-child {
    border-left: 1px solid var(--cim-border-light);
    border-radius: 10px 0 0 10px;
    padding-left: 10px;
    padding-right: 6px;
}

.cim-book-table tbody tr td:last-child {
    border-right: 1px solid var(--cim-border-light);
    border-radius: 0 10px 10px 0;
    padding-right: 14px;
}

.cim-book-table tbody tr {
    box-shadow: var(--cim-row-shadow);
}

.cim-book-table tbody tr:hover td {
    background: #fefefe;
}

.cim-col-number {
    width: 54px;
    text-align: left;
}

.cim-book-table thead th.cim-col-number {
    text-align: left;
}

.cim-month-abbr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--cim-primary-light);
    color: var(--cim-primary);
    font-weight: 700;
    font-size: 0.625rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.cim-title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cim-book-cover {
    flex-shrink: 0;
    display: block;
    width: 48px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    line-height: 0;
}

.cim-book-cover-img {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 3px;
}

.cim-book-title,
.cim-book-title-link {
    font-weight: 700;
    color: var(--cim-text);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.35;
}

.cim-book-title-link:hover {
    color: var(--cim-primary);
}

.cim-col-title {
    overflow: visible;
}

.cim-col-title .cim-title-cell {
    overflow: hidden;
}

.cim-col-author {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.cim-col-topic {
    color: #4b5563;
    font-size: 0.875rem;
}

.cim-col-participation {
    text-align: left;
    overflow: visible;
}

.cim-col-shop {
    text-align: left;
}

.cim-book-table thead th.cim-col-shop,
.cim-book-table tbody td.cim-col-shop {
    text-align: left;
    overflow: visible;
}

.cim-col-shop .cim-cell-value {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.cim-shop-buttons {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: flex-start;
    justify-content: flex-start;
}

.cim-buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background-color: red;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.cim-buy-now-btn:hover,
.cim-buy-now-btn:focus {
    background-color: #c40000;
    color: white;
    text-decoration: none;
    opacity: 0.95;
}

.cim-buy-now-btn:focus-visible {
    outline: 2px solid #c40000;
    outline-offset: 2px;
}

/* Participation badges */
.cim-participation-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--cim-badge-bg);
    color: var(--cim-badge-text);
}

.cim-badge-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.cim-badge-zoom,
.cim-badge-skype,
.cim-badge-email,
.cim-badge-default {
    background: var(--cim-badge-bg);
    color: var(--cim-badge-text);
}

/* Footer */
.cim-book-list-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    padding-top: 2px;
    font-size: 0.75rem;
    color: var(--cim-text-muted);
    text-align: center;
}

.cim-info-icon {
    width: 16px;
    height: 16px;
    color: var(--cim-primary);
    flex-shrink: 0;
}

.cim-no-books {
    text-align: center;
    padding: 32px 16px;
    color: var(--cim-text-muted);
    margin: 0;
    background: var(--cim-bg-subtle);
    border-radius: 10px;
    font-size: 0.8125rem;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Tablet */
@media (max-width: 900px) {
    .cim-book-list-wrapper {
        padding: 24px 20px;
    }

    .cim-book-list-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cim-year-filter {
        align-self: flex-start;
        padding-top: 0;
        width: 100%;
    }

    .cim-year-select-wrap {
        width: 100%;
        max-width: 220px;
    }

    .cim-search-container {
        max-width: 100%;
    }

    .cim-table-responsive {
        overflow-x: visible;
    }

    .cim-book-table {
        display: block;
        width: 100%;
        table-layout: auto;
        border-spacing: 0;
        min-width: 0;
    }

    .cim-book-table colgroup {
        display: none;
    }

    .cim-book-table thead {
        display: none;
    }

    .cim-book-table tbody {
        display: block;
        width: 100%;
    }

    .cim-book-table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        border: 1px solid var(--cim-border-light);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--cim-row-shadow);
        background: var(--cim-bg);
    }

    .cim-book-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .cim-book-table tbody tr td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        width: 100% !important;
        max-width: 100%;
        padding: 12px 14px;
        border: none !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--cim-border-light) !important;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
        background: transparent;
        box-sizing: border-box;
    }

    .cim-book-table tbody tr td:last-child {
        border-bottom: none !important;
    }

    .cim-book-table tbody tr td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        max-width: 120px;
        font-size: 0.68rem;
        font-weight: 700;
        color: var(--cim-text-heading);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        line-height: 1.4;
        padding-top: 2px;
    }

    .cim-col-number {
        width: 100% !important;
        text-align: left;
    }

    .cim-col-number::before {
        content: attr(data-label);
    }

    .cim-col-title .cim-title-cell,
    .cim-cell-value {
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .cim-col-title .cim-title-cell {
        width: 100%;
    }

    .cim-participation-badge {
        white-space: normal;
    }

    .cim-shop-buttons {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .cim-col-shop .cim-cell-value {
        display: flex;
        justify-content: flex-start;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 680px) {
    .cim-book-list-wrapper {
        padding: 18px 14px;
        border-radius: 16px;
    }

    .cim-header-left {
        gap: 12px;
    }

    .cim-header-icon {
        width: 44px;
        height: 44px;
    }

    .cim-header-icon svg {
        width: 22px;
        height: 22px;
    }

    .cim-dynamic-title {
        font-size: 1.35rem;
    }

    .cim-dynamic-description {
        font-size: 0.875rem;
    }

    .cim-header-divider {
        width: 120px;
    }

    .cim-search-toolbar {
        margin-bottom: 12px;
    }

    .cim-search-container {
        height: 40px;
        padding: 0 12px;
    }

    .cim-book-table tbody tr td {
        padding: 11px 12px;
        gap: 10px;
    }

    .cim-book-table tbody tr td::before {
        flex: 0 0 34%;
        max-width: 105px;
        font-size: 0.65rem;
    }

    .cim-book-cover {
        width: 42px;
        height: 56px;
    }

    .cim-year-select-wrap {
        max-width: none;
    }
}
