/* =========================================================
   任务清单 (quest_list.php) 样式
   ★ 与怪物/物件图鉴同一套视觉语言:
     浅色卡片 + 白面板 12px 圆角 + 0 2px 10px 软阴影 / 主色 #2f6fa8 / 边框 #d8dee5
     文字 #2c3e50(标题) · #34495e(正文) · #97a3b0(次要)
   2026-09-30 重写: 原表格版既不适配手机, 长文本也把表格撑爆 —— 改行卡片+展开详情
   ========================================================= */

.ql-wrapper { max-width: 1180px; margin: 2em auto 3em; padding: 0 15px; }
.ql-title { font-size: 24px; font-weight: bold; text-align: center; margin-bottom: 4px; letter-spacing: 6px; color: #2c3e50; }
.ql-subtitle { text-align: center; color: #97a3b0; font-size: 12px; letter-spacing: 1px; margin-bottom: 20px; line-height: 1.8; }

/* ---------- 过滤面板 ---------- */
.ql-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); padding: 14px 16px; margin-bottom: 16px; }
.ql-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ql-filter-row + .ql-filter-row { margin-top: 10px; }

.ql-input, .ql-select {
    border: 1px solid #d8dee5; border-radius: 8px; padding: 8px 10px; font-size: 13px;
    color: #34495e; background: #fff; font-family: inherit;
}
.ql-input { flex: 1 1 240px; min-width: 170px; }
.ql-input:focus, .ql-select:focus { outline: none; border-color: #7fb3d5; box-shadow: 0 0 0 3px rgba(127,179,213,.18); }
.ql-select { max-width: 220px; }
.ql-input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* 分段选择 (章节 / 模式): 一组小按钮 */
.ql-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #f0f3f6; border-radius: 8px; padding: 3px; }
.ql-seg button {
    border: none; background: transparent; color: #7b8894; font-size: 12px; font-family: inherit;
    padding: 5px 12px; border-radius: 6px; cursor: pointer; line-height: 1.4; transition: background .12s, color .12s;
}
.ql-seg button.on { background: #fff; color: #2f6fa8; font-weight: bold; box-shadow: 0 1px 4px rgba(31,74,111,.14); }
.ql-seg-label { font-size: 12px; color: #97a3b0; margin-right: 2px; }

.ql-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #7b8894; cursor: pointer; user-select: none; white-space: nowrap; padding: 5px 2px; }
.ql-chk input { margin: 0; accent-color: #2f6fa8; width: 15px; height: 15px; }
.ql-count { color: #97a3b0; font-size: 12px; margin-left: auto; white-space: nowrap; }
.ql-count b { color: #2f6fa8; }

/* ---------- 任务行卡片 ---------- */
.ql-list { display: flex; flex-direction: column; gap: 8px; }
.ql-empty { text-align: center; color: #97a3b0; padding: 46px 0; font-size: 13px; line-height: 2; }

.ql-quest {
    background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1px solid transparent; overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.ql-quest[open] { border-color: #a9c9e2; box-shadow: 0 4px 16px rgba(31,74,111,.10); }

.ql-quest summary {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; cursor: pointer; list-style: none; user-select: none;
    min-height: 44px; /* 手机触控目标 */
    -webkit-tap-highlight-color: rgba(47,111,168,.08);
}
.ql-quest summary::-webkit-details-marker { display: none; }
.ql-quest summary:hover .ql-name { color: #2f6fa8; }

.ql-head { flex: 1 1 auto; min-width: 0; }
.ql-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ql-id { font-size: 11px; color: #97a3b0; font-weight: 600; letter-spacing: .5px; }
.ql-name { font-size: 15px; font-weight: bold; color: #2c3e50; transition: color .12s; }
.ql-brief {
    margin-top: 5px; font-size: 12px; color: #97a3b0; line-height: 1.6;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}

.ql-chev {
    flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px;
    color: #b3bfca; transition: transform .18s;
}
.ql-quest[open] .ql-chev { transform: rotate(180deg); color: #2f6fa8; }

/* 徽章 */
.ql-badge {
    display: inline-block; font-size: 11px; line-height: 1; padding: 4px 7px;
    border-radius: 5px; background: #f0f3f6; color: #7b8894; white-space: nowrap; font-weight: 600;
}
.ql-b-ep { background: #2f6fa8; color: #fff; }
.ql-b-solo { background: #f1ecf9; color: #6b4fa8; }
/* 类别按任务类型着色 */
.ql-b-normal { background: #e8f1f8; color: #2f6fa8; }
.ql-b-government { background: #e6f4f1; color: #1d7a6f; }
.ql-b-battle { background: #fdecec; color: #c0392b; }
.ql-b-challenge { background: #fdf3e7; color: #b9770e; }
.ql-oneperson { background: #f1ecf9; color: #6b4fa8; }
/* 限时窗口 */
.ql-b-limit { background: #fff4e5; color: #c87f0a; }
.ql-b-upcoming { background: #e8f1f8; color: #2f6fa8; }
.ql-b-ended { background: #f0f2f5; color: #97a3b0; }

/* ---------- 展开详情 ---------- */
.ql-body { padding: 2px 16px 14px; border-top: 1px dashed #e4e9ee; margin: 0 0; }
.ql-sec { margin-top: 12px; }
.ql-sec-title {
    font-size: 11px; color: #97a3b0; font-weight: bold; letter-spacing: 2px; margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
}
.ql-sec-title::after { content: ""; flex: 1; height: 1px; background: #edf1f5; }
.ql-sec-text { font-size: 13px; color: #34495e; line-height: 1.9; white-space: pre-line; word-break: break-word; }
.ql-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #97a3b0; }
.ql-meta b { color: #7b8894; font-weight: 600; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
    .ql-wrapper { margin: 1.2em auto 2.5em; padding: 0 10px; }
    .ql-title { font-size: 20px; letter-spacing: 4px; }
    .ql-subtitle { font-size: 11px; }
    .ql-card { padding: 10px 12px; border-radius: 10px; }
    .ql-filter-row { gap: 6px; }
    .ql-input { flex-basis: 100%; }        /* 搜索框独占一行 */
    .ql-select { flex: 1 1 auto; max-width: none; }
    .ql-count { margin-left: 0; flex-basis: 100%; }
    .ql-seg button { padding: 6px 12px; }  /* 触控目标加高 */
    .ql-quest summary { padding: 11px 12px; }
    .ql-name { font-size: 14px; }
    .ql-brief { -webkit-line-clamp: 2; }
    .ql-body { padding: 2px 12px 12px; }
}
