.quest-login-notice {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #f2d09b;
    border-radius: 6px;
    background: #fff9ed;
    color: #8a4d12;
    text-align: left;
}
.quest-login-notice:hover { background: #fff4dc; }
.quest-login-notice strong,
.quest-login-notice small { display: block; font-weight: 400; }
.quest-login-notice strong { font-size: 14px; color: #713f12; }
.quest-login-notice small { margin-top: 1px; font-size: 12px; color: #a16207; }
.quest-progress-tabs { display: inline-flex; padding: 3px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; }
.quest-progress-tabs button { min-width: 68px; height: 28px; padding: 0 10px; border-radius: 4px; color: #64748b; font-size: 12px; font-weight: 400; }
.quest-progress-tabs button:hover { color: #334155; }
.quest-progress-tabs button.is-active { background: #fff; color: #2563eb; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.quest-list-shell { overflow: hidden; border: 1px solid #dce3eb; border-radius: 6px; background: #fff; }
.quest-row { border-bottom: 1px solid #edf1f5; color: #334155; font-size: 13px; }
.quest-row:last-of-type { border-bottom: 0; }
.quest-row.is-saving { opacity: .65; }
.quest-row.is-completed .quest-summary { background: #f8fcfa; }
.quest-row.is-completed .quest-name { color: #64748b; text-decoration: line-through; text-decoration-color: #94a3b8; }
.quest-summary { display: flex; min-height: 66px; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; transition: background-color .15s ease; }
.quest-summary:hover, .quest-summary:focus-visible { background: #f8fbff; outline: 0; }
.quest-row.is-expanded .quest-summary { background: #f5f9fd; }
.quest-check { display: inline-flex; width: 23px; height: 23px; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: transparent; transition: .15s ease; }
.quest-check:hover { border-color: #22c55e; }
.quest-check.is-checked { border-color: #22c55e; background: #22c55e; color: #fff; }
.quest-check:disabled { cursor: wait; }
.quest-summary-main { min-width: 260px; flex: 1 1 420px; }
.quest-title-line { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.quest-name { display: inline-block; width: fit-content; max-width: 100%; overflow: hidden; color: #1e4b78; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.quest-series { min-width: 0; overflow: hidden; color: #94a3b8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.quest-subline { display: flex; min-width: 0; flex-wrap: wrap; gap: 3px 8px; margin-top: 4px; color: #94a3b8; font-size: 11px; }
.quest-subline > span { white-space: nowrap; }
.quest-subline span:first-child { flex: 0 0 auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.quest-inline-entity { display: inline-block; width: fit-content; color: #64748b; }
.quest-inline-entity:hover { color: #2563eb; text-decoration: underline; }
.quest-summary-stats { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.quest-stat { display: inline-flex; height: 24px; align-items: center; gap: 4px; padding: 0 7px; border-radius: 4px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 400; white-space: nowrap; }
.quest-stat-area { background: #ecfdf3; color: #15803d; }
.quest-stat-completed { background: #fff1f2; color: #be123c; }
.quest-stat-exp { background: #f5f3ff; color: #6d4bc3; }
.quest-stat-money { background: #fff7ed; color: #b45309; }
.quest-expand-label { display: inline-flex; height: 26px; align-items: center; gap: 2px; padding-left: 4px; color: #2563eb; font-size: 12px; white-space: nowrap; }
.quest-expand-label [class*="chevron-down"] { transition: transform .15s ease; }
.quest-expand-label .is-rotated { transform: rotate(180deg); }
.quest-details { padding: 16px 46px 18px; border-top: 1px solid #e5ebf1; background: #fbfdff; }
.quest-description { max-width: 1040px; color: #526171; font-size: 13px; line-height: 1.75; }
.quest-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.quest-detail-section { min-width: 0; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
.quest-detail-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; color: #475569; font-size: 13px; font-weight: 500; }
.quest-detail-rewards h3 { color: #9a5b11; }
.quest-detail-entries { display: flex; flex-wrap: wrap; gap: 7px; }
.quest-detail-entry { display: inline-flex; min-height: 30px; max-width: 100%; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; background: #f8fafc; color: #475569; }
.quest-detail-rewards .quest-detail-entry { background: #fff9ed; color: #8a5a18; }
.quest-detail-entry b { flex: 0 0 auto; color: #64748b; font-weight: 400; }
.quest-entry-icon { display: flex; width: 22px; height: 22px; flex: 0 0 22px; align-items: center; justify-content: center; }
.quest-entry-icon img { max-width: 22px; max-height: 22px; object-fit: contain; }
.quest-entry-fallback { flex: 0 0 auto; color: #94a3b8; font-size: 17px; }
.quest-entry-name { display: inline-block; width: fit-content; max-width: 230px; overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
a.quest-entry-name:hover { color: #2563eb; text-decoration: underline; }
.quest-detail-empty { color: #94a3b8; font-size: 12px; }
.quest-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.quest-entity { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 7px; color: #475569; }
.quest-entity-icon { display: flex; width: 28px; height: 28px; flex: 0 0 28px; align-items: center; justify-content: center; }
.quest-entity-icon img { width: 28px; height: 28px; object-fit: contain; }
.quest-entity-name { display: inline-block; width: fit-content; max-width: 180px; overflow: hidden; color: #475569; text-overflow: ellipsis; white-space: nowrap; }
.quest-entity-name:hover { color: #2563eb; }
.quest-muted { color: #94a3b8 !important; }
.quest-view-link { display: inline-flex; width: fit-content; align-items: center; color: #2563eb; font-weight: 400; }
.quest-view-link:hover { text-decoration: underline; }
.quest-filter-empty { padding: 32px; color: #94a3b8; text-align: center; font-size: 13px; }

.dark .quest-login-notice { border-color: rgba(245, 158, 11, .25); background: rgba(120, 53, 15, .18); color: #fbbf24; }
.dark .quest-login-notice:hover { background: rgba(120, 53, 15, .25); }
.dark .quest-login-notice strong { color: #fde68a; }
.dark .quest-login-notice small { color: #d6a850; }
.dark .quest-progress-tabs { border-color: #333b46; background: #15191e; }
.dark .quest-progress-tabs button { color: #94a3b8; }
.dark .quest-progress-tabs button.is-active { background: #252c35; color: #7dd3fc; box-shadow: none; }
.dark .quest-list-shell { border-color: #303741; background: #171a1f; }
.dark .quest-row { border-color: #262d35; color: #cbd5e1; }
.dark .quest-summary:hover, .dark .quest-summary:focus-visible, .dark .quest-row.is-expanded .quest-summary { background: #1b232c; }
.dark .quest-row.is-completed .quest-summary { background: #18231f; }
.dark .quest-check { border-color: #4b5563; background: #171a1f; }
.dark .quest-check.is-checked { border-color: #22c55e; background: #22c55e; }
.dark .quest-name { color: #bae6fd; }
.dark .quest-inline-entity, .dark .quest-entity-name { color: #cbd5e1; }
.dark .quest-stat { background: #252c35; color: #aeb9c7; }
.dark .quest-stat-area { background: rgba(34, 197, 94, .1); color: #86efac; }
.dark .quest-stat-completed { background: rgba(244, 63, 94, .1); color: #fda4af; }
.dark .quest-stat-exp { background: rgba(139, 92, 246, .12); color: #c4b5fd; }
.dark .quest-stat-money { background: rgba(245, 158, 11, .1); color: #fcd34d; }
.dark .quest-details { border-color: #2a323c; background: #15191e; }
.dark .quest-description { color: #aeb9c7; }
.dark .quest-detail-section { border-color: #303741; background: #1b2026; }
.dark .quest-detail-section h3 { color: #cbd5e1; }
.dark .quest-detail-rewards h3 { color: #fcd38a; }
.dark .quest-detail-entry { background: #252c35; color: #cbd5e1; }
.dark .quest-detail-rewards .quest-detail-entry { background: rgba(120, 53, 15, .18); color: #fcd38a; }
.dark .quest-view-link { color: #7dd3fc; }

@media (min-width: 1100px) {
    .quest-details { padding-right: 82px; }
}

@media (max-width: 767px) {
    .quest-login-notice { align-items: flex-start; }
    .quest-summary { align-items: flex-start; flex-wrap: wrap; gap: 9px; padding: 11px 10px; }
    .quest-summary-main { min-width: 0; flex: 1 1 calc(100% - 42px); }
    .quest-summary-stats { width: 100%; padding-left: 35px; justify-content: flex-start; }
    .quest-series { display: none; }
    .quest-stat-completed { order: 4; }
    .quest-expand-label { margin-left: auto; }
    .quest-details { padding: 14px 12px 16px; }
    .quest-detail-grid { grid-template-columns: 1fr; }
    .quest-detail-footer { align-items: flex-start; flex-direction: column; }
}
