.rcj-shell,
.rcj-ritual-box,
.rcj-notice {
    box-sizing: border-box;
    color: #25201d;
    font-family: inherit;
}

.rcj-shell *,
.rcj-ritual-box *,
.rcj-notice * {
    box-sizing: border-box;
}

.rcj-shell {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 16px 96px;
}

.rcj-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: end;
    margin-bottom: 24px;
}

.rcj-eyebrow {
    margin: 0 0 8px;
    color: #9a6c3f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.rcj-header h2,
.rcj-ritual-box h3 {
    margin: 0;
    color: #9a6c3f;
    font-size: clamp(26px, 3vw, 44px);
    font-weight: 500;
    line-height: 1.15;
}

.rcj-header p {
    max-width: 760px;
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 1.6;
}

.rcj-progress {
    width: 100%;
    padding: 18px;
    border: 1px solid #ead8cb;
    border-radius: 8px;
    background: #fffaf7;
}

.rcj-progress-top,
.rcj-progress-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.rcj-progress-top span {
    font-weight: 700;
}

.rcj-progress-top strong {
    color: #9a2847;
    font-size: 22px;
}

.rcj-progress-track {
    width: 100%;
    height: 12px;
    margin: 14px 0 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f3d6dc;
}

.rcj-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #c04a68;
    transition: width 220ms ease;
}

.rcj-progress-meta {
    color: #6b5b52;
    font-size: 13px;
    flex-wrap: wrap;
}

.rcj-progress-compact {
    padding: 12px 14px;
    background: #fff;
}

.rcj-progress-compact .rcj-progress-top strong {
    font-size: 18px;
}

.rcj-progress-compact .rcj-progress-track {
    height: 8px;
    margin: 9px 0 7px;
}

.rcj-progress-compact .rcj-progress-meta {
    font-size: 12px;
}

.rcj-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin: 24px 0 30px;
}

.rcj-search {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d9c3b4;
    border-radius: 8px;
    background: #fff;
    color: #25201d;
    font: inherit;
}

.rcj-search:focus {
    border-color: #9a6c3f;
    box-shadow: 0 0 0 3px rgba(154, 108, 63, 0.16);
    outline: none;
}

.rcj-filters {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.rcj-filter,
.rcj-button,
.rcj-mini-button,
.rcj-icon-button {
    min-height: 40px;
    border: 1px solid #c9a98a;
    border-radius: 8px;
    background: #fff;
    color: #563d2b;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rcj-filter,
.rcj-button,
.rcj-mini-button {
    padding: 8px 13px;
}

.rcj-filter:hover,
.rcj-button:hover,
.rcj-mini-button:hover,
.rcj-icon-button:hover {
    border-color: #9a6c3f;
    transform: translateY(-1px);
}

.rcj-filter.is-active,
.rcj-button.is-active,
.rcj-button:not(.rcj-button-light),
.rcj-mini-button {
    border-color: #9a2847;
    background: #9a2847;
    color: #fff;
}

.rcj-button-light {
    background: #fffaf7;
    color: #563d2b;
}

.rcj-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px 44px;
}

.rcj-card {
    position: relative;
    min-width: 0;
}

.rcj-card[hidden] {
    display: none;
}

.rcj-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.rcj-card-link:hover .rcj-card-media {
    transform: translateY(-2px);
}

.rcj-shell .rcj-card-media {
    position: relative;
    display: block;
    overflow: visible;
    width: 100%;
    aspect-ratio: auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0;
    padding: 0 !important;
    transition: transform 160ms ease;
}

.rcj-shell .rcj-card-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    object-fit: contain;
    padding: 0 !important;
}

.rcj-card-fallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #e98fa4;
    color: #8f2742;
    font-size: 20px;
    line-height: 1.35;
    text-align: center;
}

.rcj-card-badge,
.rcj-status-pill {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #8f2742;
    font-size: 12px;
    font-weight: 800;
}

.rcj-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    display: none !important;
}

.rcj-card[data-status="completed"] .rcj-card-badge {
    background: #9a2847;
    color: #fff;
}

.rcj-card[data-status="started"] .rcj-card-badge {
    background: #9a6c3f;
    color: #fff;
}

.rcj-card-title {
    display: block;
    min-height: 58px;
    margin-top: 14px;
    color: #9a6c3f;
    font-family: "Forum", "Times New Roman", serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.rcj-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.rcj-card-actions .rcj-icon-button {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 40px;
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 1px solid #c9a98a;
    border-radius: 8px;
    background: #fffaf7;
    color: #9a2847;
    box-shadow: none;
    font-size: 0;
    line-height: 1;
}

.rcj-card-actions .rcj-icon-button[aria-pressed="true"] {
    border-color: #9a2847;
    background: #fff0f4;
    color: #9a2847;
}

.rcj-heart-icon {
    display: block;
    width: 18px;
    height: 18px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.9;
    transition: fill 160ms ease, transform 160ms ease;
}

.rcj-card-actions .rcj-icon-button[aria-pressed="true"] .rcj-heart-icon {
    fill: currentColor;
}

.rcj-card-actions .rcj-icon-button:hover .rcj-heart-icon {
    transform: scale(1.08);
}

.rcj-mini-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.rcj-empty,
.rcj-notice {
    padding: 16px;
    border: 1px solid #ead8cb;
    border-radius: 8px;
    background: #fffaf7;
}

.rcj-auto-progress {
    clear: both;
    width: 100%;
    margin: 0 0 28px;
}

.rcj-ritual-box {
    max-width: 760px;
    margin: 34px 0 96px;
    padding: 22px;
    border: 1px solid #ead8cb;
    border-radius: 8px;
    background: #fffaf7;
}

.rcj-ritual-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rcj-ritual-box h3 {
    color: #25201d;
    font-size: 24px;
}

.rcj-status-pill {
    flex: 0 0 auto;
    padding: 5px 10px;
}

.rcj-status-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.rcj-ritual-progress {
    margin: 0 0 18px;
}

.rcj-ritual-progress .rcj-progress {
    background: #fff;
}

.rcj-note-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.rcj-note {
    width: 100%;
    min-height: 132px;
    padding: 12px;
    border: 1px solid #d9c3b4;
    border-radius: 8px;
    background: #fff;
    color: #25201d;
    font: inherit;
    resize: vertical;
}

.rcj-note:focus {
    border-color: #9a6c3f;
    box-shadow: 0 0 0 3px rgba(154, 108, 63, 0.16);
    outline: none;
}

.rcj-note-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.rcj-back-row {
    margin-top: 18px;
}

.rcj-back-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #c9a98a;
    border-radius: 8px;
    background: #fff;
    color: #563d2b;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rcj-back-button:hover {
    border-color: #9a6c3f;
    color: #563d2b;
    transform: translateY(-1px);
}

.rcj-save-state {
    color: #6b5b52;
    font-size: 14px;
}

.rcj-admin .rcj-progress {
    max-width: 420px;
    margin: 12px 0 24px;
}

.rcj-admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.rcj-admin-stat {
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.rcj-admin-stat strong {
    display: block;
    color: #9a2847;
    font-size: 28px;
}

.rcj-admin-stat span {
    color: #50575e;
}

.rcj-admin-filters {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(180px, 240px) auto;
    gap: 12px;
    align-items: end;
    max-width: 860px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.rcj-admin-filters label span {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.rcj-admin-filters input,
.rcj-admin-filters select {
    width: 100%;
}

.rcj-admin-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rcj-admin-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f6f7f7;
    color: #3c434a;
    font-weight: 700;
    white-space: nowrap;
}

.rcj-admin-status-completed {
    background: #e7f5ed;
    color: #116329;
}

.rcj-admin-status-in_progress,
.rcj-admin-status-started,
.rcj-admin-status-opened {
    background: #fff4dc;
    color: #8a4b00;
}

.rcj-admin-status-no_activity {
    background: #f6e9ed;
    color: #9a2847;
}

.rcj-admin-table td,
.rcj-admin-table th {
    vertical-align: top;
}

.rcj-admin-detail td:last-child {
    max-width: 320px;
}

@media (max-width: 1024px) {
    .rcj-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }

    .rcj-header,
    .rcj-toolbar {
        grid-template-columns: 1fr;
    }

    .rcj-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .rcj-shell {
        padding: 18px 12px 92px;
    }

    .rcj-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 16px;
    }

    .rcj-card-title {
        min-height: 48px;
        font-size: 15px;
    }

    .rcj-card-fallback {
        padding: 14px;
        font-size: 15px;
    }

    .rcj-status-actions,
    .rcj-note-row {
        align-items: stretch;
        flex-direction: column;
    }

    .rcj-filters {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .rcj-filter {
        display: inline-flex;
        width: 100%;
        min-width: 0;
        align-items: center;
        justify-content: center;
        padding: 10px 8px;
        text-align: center;
    }

    .rcj-filter:nth-child(5) {
        grid-column: 1 / -1;
    }

    .rcj-card-actions {
        flex-direction: row;
        align-items: center;
    }

    .rcj-card-actions .rcj-icon-button {
        flex: 0 0 40px;
        width: 40px !important;
        min-width: 40px !important;
    }

    .rcj-card-actions .rcj-mini-button {
        flex: 1;
        width: auto;
    }

    .rcj-button {
        width: 100%;
    }

    .rcj-back-button {
        width: 100%;
    }

    .rcj-ritual-head {
        flex-direction: column;
    }

    .rcj-admin-stats {
        grid-template-columns: 1fr;
    }

    .rcj-admin-filters {
        grid-template-columns: 1fr;
    }
}
