.quest-page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 128px 24px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, .5fr);
    gap: 22px;
    align-items: end;
}

.quest-page-hero > div {
    border: 1px solid rgba(0, 53, 102, .08);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 248, 255, .88));
    box-shadow: var(--shadow);
}

.quest-page-hero > div:first-child {
    padding: 30px;
}

.quest-page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: var(--line-tight);
}

.quest-page-hero p:not(.admin-tag) {
    max-width: 68ch;
    color: #5f7187;
    line-height: 1.75;
}

.quest-hero-actions {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.quest-admin-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 42px;
}

.quest-loading,
.quest-empty-state,
.quest-card,
.quest-list-panel {
    border: 1px solid rgba(0, 53, 102, .08);
    border-radius: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow);
}

.quest-loading,
.quest-empty-state {
    padding: 28px;
}

.quest-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .48fr);
    gap: 22px;
    align-items: start;
}

.quest-form-stack {
    display: grid;
    gap: 18px;
}

.quest-card {
    overflow: hidden;
}

.quest-card-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    color: #fff;
    background: linear-gradient(135deg, #07364b, #0f4c81);
}

.quest-card-head p,
.quest-card-head h2 {
    margin: 0;
}

.quest-card-head p {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.quest-card-head h2 {
    margin-top: 6px;
    font-size: 1.45rem;
}

.quest-card-head strong {
    align-self: start;
    padding: 8px 11px;
    border-radius: 999px;
    color: #07364b;
    background: #20d6cf;
    font-size: 12px;
}

.quest-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 24px 24px;
}

.quest-form label {
    display: grid;
    gap: 8px;
    color: #52677d;
    font-size: 13px;
    font-weight: 800;
}

.quest-form label.quest-wide,
.quest-form button,
.quest-form .quest-note {
    grid-column: 1 / -1;
}

.quest-switch {
    align-items: center;
    display: flex !important;
    flex-direction: row;
    gap: 8px !important;
    min-height: 30px;
    align-self: end;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.35;
}

.quest-switch input {
    width: 15px;
    height: 15px;
    min-height: 0;
    accent-color: #0ea5e9;
}

.quest-form input,
.quest-form select,
.quest-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(0, 53, 102, .14);
    border-radius: 14px;
    padding: 12px 14px;
    color: #0f2d3f;
    background: linear-gradient(180deg, #fff, #f6fbff);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
}

.quest-form textarea {
    min-height: 86px;
    resize: vertical;
}

.quest-note {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}

.quest-list-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.quest-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.quest-list-head p,
.quest-list-head h2 {
    margin: 0;
}

.quest-list-head p {
    color: #0ea5e9;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.quest-list-head h2 {
    font-size: 1.35rem;
}

.quest-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.quest-summary-chip {
    padding: 13px;
    border-radius: 16px;
    background: #f0f8ff;
}

.quest-summary-chip span,
.quest-summary-chip strong {
    display: block;
}

.quest-summary-chip span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.quest-summary-chip strong {
    margin-top: 4px;
    color: #0f4c81;
    font-size: 1.25rem;
}

.quest-section-title {
    margin: 20px 0 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.quest-item {
    display: grid;
    gap: 10px;
    padding: 15px;
    border: 1px solid rgba(0, 53, 102, .08);
    border-radius: 18px;
    background: #fff;
}

.quest-item + .quest-item {
    margin-top: 10px;
}

.quest-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.quest-item strong {
    color: #0f2d3f;
}

.quest-item p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.quest-pill {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 5px 8px;
    border-radius: 999px;
    color: #0f4c81;
    background: rgba(14, 165, 233, .12);
    font-size: 11px;
    font-weight: 900;
}

.quest-item-actions {
    display: flex;
    justify-content: flex-end;
}

.quest-danger-mini {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    padding: 7px 10px;
    color: #b91c1c;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 900;
}

.quest-status {
    min-height: 22px;
    margin: 0;
    color: #0f4c81;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1040px) {
    .quest-page-hero,
    .quest-layout {
        grid-template-columns: 1fr;
    }

    .quest-list-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .quest-page-hero,
    .quest-admin-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .quest-page-hero {
        padding-top: 108px;
    }

    .quest-form {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .quest-card-head {
        flex-direction: column;
        padding: 20px;
    }

    .quest-summary-grid {
        grid-template-columns: 1fr;
    }
}
