@charset "utf-8";
/* 我的 PDC：自定义功能样式 */
:root {
	--mypdc-bg: #fff;
	--mypdc-fg: #222;
	--mypdc-line: #ccc;
	--mypdc-soft: #f4f4f6;
	--mypdc-accent: #c05;
	--mypdc-ok: #1a7f37;
	--mypdc-dead: #c62828;
}
@media (prefers-color-scheme: dark) {
	:root {
		--mypdc-bg: #1e1e22;
		--mypdc-fg: #e6e6e6;
		--mypdc-line: #444;
		--mypdc-soft: #2a2a30;
		--mypdc-accent: #ff5c93;
		--mypdc-ok: #4caf50;
		--mypdc-dead: #ff6b6b;
	}
}

/* 排序条件 */
.mypdc-sort-cfg {
	margin: 4px 0;
	padding: 4px 8px;
	border: 1px dashed var(--mypdc-line);
	border-radius: 6px;
	font-size: 0.9em;
}
.mypdc-sort-cfg summary { cursor: pointer; font-weight: bold; }
.mypdc-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	margin: 4px 0;
}
.mypdc-row label { white-space: nowrap; }
.mypdc-hint { color: #888; font-size: 0.85em; margin: 4px 0; }
.mypdc-warn { color: var(--mypdc-dead); margin: 6px 0; }

.search-mon-list > * { position: relative; }
.mypdc-sortval {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 11px;
	line-height: 14px;
	text-align: center;
	pointer-events: none;
	z-index: 2;
	white-space: nowrap;
	overflow: hidden;
}

/* 减伤模拟面板 */
.mypdc-open-btn {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 900;
	padding: 10px 16px;
	font-size: 15px;
	border: none;
	border-radius: 22px;
	background: var(--mypdc-accent);
	color: #fff;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}
body.mypdc-panel-open { overflow: hidden; }
body.mypdc-panel-open .mypdc-open-btn { display: none; }
.mypdc-panel {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--mypdc-bg);
	color: var(--mypdc-fg);
	display: flex;
	flex-direction: column;
	font-size: 14px;
}
.mypdc-panel.display-none { display: none; }
.mypdc-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 16px;
	border-bottom: 1px solid var(--mypdc-line);
}
.mypdc-panel-head h2 { margin: 0; font-size: 18px; }
.mypdc-panel-body {
	flex: 1;
	overflow: auto;
	padding: 8px 16px 40px;
}
.mypdc-box {
	border: 1px solid var(--mypdc-line);
	border-radius: 8px;
	padding: 8px 10px;
	margin: 8px 0;
	background: var(--mypdc-bg);
}
.mypdc-panel input, .mypdc-panel select, .mypdc-panel textarea, .mypdc-panel button {
	font-size: 14px;
	color: inherit;
	background: var(--mypdc-soft);
	border: 1px solid var(--mypdc-line);
	border-radius: 4px;
	padding: 2px 4px;
}
.mypdc-panel button { cursor: pointer; padding: 3px 10px; }
.mypdc-panel input:disabled, .mypdc-panel select:disabled { opacity: 0.85; }
.mypdc-note { width: 100%; box-sizing: border-box; margin-top: 4px; resize: vertical; }
.mypdc-summary span { font-weight: bold; }

.mypdc-table-wrap { overflow-x: auto; }
.mypdc-table { border-collapse: collapse; margin: 4px 0; }
.mypdc-table th, .mypdc-table td {
	border: 1px solid var(--mypdc-line);
	padding: 3px 6px;
	text-align: center;
	white-space: nowrap;
}
.mypdc-table th { background: var(--mypdc-soft); font-weight: normal; }
.mypdc-ok { color: var(--mypdc-ok); font-weight: bold; }
.mypdc-dead { color: var(--mypdc-dead); font-weight: bold; }
.mypdc-row-dead { background: rgba(255, 80, 80, 0.08); }
.mypdc-enemy-name { font-size: 11px; color: #888; max-width: 8em; overflow: hidden; text-overflow: ellipsis; }

.mypdc-attr { font-weight: bold; }
.mypdc-attr-0 { color: #e53935; }
.mypdc-attr-1 { color: #1e88e5; }
.mypdc-attr-2 { color: #43a047; }
.mypdc-attr-3 { color: #d4a000; }
.mypdc-attr-4 { color: #8e24aa; }
select.mypdc-attr-sel { font-weight: bold; }

@media (max-width: 600px) {
	.mypdc-panel-body { padding: 6px 8px 40px; }
	.mypdc-panel { font-size: 13px; }
}

/* 手机：每条攻击显示成卡片 */
@media (max-width: 760px) {
	.mypdc-attack-table, .mypdc-attack-table tbody { display: block; }
	.mypdc-attack-table tr:first-child { display: none; }
	.mypdc-attack-table tr {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 4px 8px;
		padding: 8px;
		margin-bottom: 8px;
		border: 1px solid var(--mypdc-line);
		border-radius: 8px;
	}
	.mypdc-attack-table td {
		display: block;
		border: none;
		padding: 0;
		text-align: left;
		white-space: normal;
		min-width: 0;
	}
	.mypdc-attack-table td::before {
		content: attr(data-label);
		display: block;
		font-size: 11px;
		color: #888;
	}
	.mypdc-attack-table td:last-child::before { content: none; }
	.mypdc-attack-table td input, .mypdc-attack-table td select {
		width: 100% !important;
		box-sizing: border-box;
	}
	.mypdc-attack-table td:nth-child(10), .mypdc-attack-table td:nth-child(11) { font-weight: bold; }
}

/* 编辑宠物窗口打开时隐藏减伤按钮，避免挡住“确认修改” */
body:has(.edit-box:not(.display-none)) .mypdc-open-btn { display: none; }

/* ---------- 能力值条件面板 ---------- */
.mypdc-label { color: #bbb; }
.mypdc-switch { font-weight: bold; }

/* ---------- 主动技能筛选 ---------- */
.mypdc-skill-filter {
	margin: 6px 0;
	padding: 4px 8px;
	border: 1px dashed var(--mypdc-line);
	border-radius: 6px;
	font-size: 0.9em;
}
.mypdc-skill-filter summary { cursor: pointer; font-weight: bold; }
.mypdc-chip-count { font-weight: normal; color: #ffd54f; }
.mypdc-chip-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 4px 0;
}
.mypdc-chip-title {
	display: inline-block;
	min-width: 5.5em;
	color: #ddd;
	font-size: 0.9em;
}
.mypdc-chip {
	font-size: 13px;
	padding: 3px 9px;
	border-radius: 14px;
	border: 1px solid #999;
	background: rgba(255, 255, 255, 0.85);
	color: #333;
	cursor: pointer;
}
.mypdc-chip.on {
	background: #ff9800;
	border-color: #e65100;
	color: #fff;
	font-weight: bold;
}
.mypdc-chip-attr-0 { color: #e53935; }
.mypdc-chip-attr-1 { color: #1e88e5; }
.mypdc-chip-attr-2 { color: #2e7d32; }
.mypdc-chip-attr-3 { color: #b8860b; }
.mypdc-chip-attr-4 { color: #8e24aa; }
.mypdc-chip-attr-5 { color: #d81b60; }
.mypdc-chip.on[class*="mypdc-chip-attr-"] { color: #fff; }

/* ---------- 列表显示 ---------- */
.mypdc-list-wrap { display: none; }
body.mypdc-listview .search-mon-list { display: none !important; }
body.mypdc-listview .mypdc-list-wrap {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 45vh;
	overflow: auto;
	resize: vertical;
	background: #fafafa;
	color: #222;
	border: 1px solid white;
	border-radius: 5px;
}
.mypdc-list-empty { padding: 12px; }
.mypdc-list-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 13px;
}
.mypdc-list-table th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: #4e3b2b;
	color: #fff;
	font-weight: normal;
	padding: 4px 6px;
	white-space: nowrap;
	user-select: none;
}
.mypdc-list-table th.mypdc-sortable { cursor: pointer; }
.mypdc-list-table th.mypdc-sortable:hover { background: #6d5440; }
.mypdc-list-table th.mypdc-sorted { background: #c05; }
.mypdc-list-table td {
	border-bottom: 1px solid #ddd;
	padding: 2px 6px;
	text-align: center;
	white-space: nowrap;
}
.mypdc-list-table tbody { cursor: pointer; }
.mypdc-list-table tbody:hover td { background: #fff3e0; }
.mypdc-list-table tbody.mypdc-current td { background: #ffe0b2; }
/* 手机紧凑列表：第一行数值，第二行名称 + 觉醒 */
.mypdc-list-table.mypdc-compact { table-layout: auto; }
.mypdc-list-table.mypdc-compact th { padding: 4px 3px; }
.mypdc-list-table.mypdc-compact td { padding: 3px 3px; }
.mypdc-list-table.mypdc-compact tr.mypdc-r1 td { border-bottom: none; padding-bottom: 0; }
.mypdc-list-table.mypdc-compact td.mypdc-list-icon { width: 1%; vertical-align: top; }
.mypdc-list-table.mypdc-compact td.mypdc-list-awoken { white-space: normal; padding-top: 0; }
.mypdc-list-table.mypdc-compact .mypdc-list-name {
	font-size: 12px; color: #555; line-height: 1.3;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 0; min-width: 100%;
}
.mypdc-list-table.mypdc-compact .mypdc-saw { margin-left: 4px; }
.mypdc-list-table td.mypdc-num { text-align: right; font-variant-numeric: tabular-nums; }
.mypdc-list-table td.mypdc-list-name {
	text-align: left;
	white-space: normal;
	min-width: 8em;
	max-width: 16em;
}
.mypdc-list-icon > * { zoom: 0.45; pointer-events: none; }
.mypdc-list-awoken { text-align: left !important; }
.mypdc-aw { display: inline-flex; flex-wrap: wrap; zoom: 0.62; vertical-align: middle; }
.mypdc-saw { margin-left: 8px; opacity: 0.55; }
.mypdc-saw-pick { margin-left: 6px; font-size: 11px; color: #c05; }
.mypdc-saw-pick .awoken-icon { zoom: 0.55; }
.mypdc-more {
	display: block;
	margin: 8px auto;
	padding: 4px 16px;
	cursor: pointer;
}
@media (max-width: 760px) {
	.mypdc-list-table { font-size: 12px; }
	.mypdc-list-table td.mypdc-list-name { min-width: 6em; }
}

/* ---------- 精简上游界面 ---------- */
#help-link, #feedback-link { display: none !important; }
.mypdc-credit { font-size: 12px; color: #666; margin-left: 6px; }
.mypdc-credit a { margin: 0 2px; }
/* 条件变化自动搜索，不需要“开始搜索”；不需要“附加显示” */
.search-box .search-start, .search-box .additional-div { display: none !important; }
/* 上游排序下拉框与表格表头排序冲突，只保留结果数量 */
.search-box .sort-div > :not(.search-list-length) { display: none !important; }
.search-box .control-div .sort-div { display: flex !important; justify-content: flex-end; }

.mypdc-sort-bar {
	display: none;
	align-items: center;
	gap: 6px;
	margin: 4px 0;
	font-size: 14px;
	color: #fff;
}
body:not(.mypdc-listview) .mypdc-sort-bar { display: flex; }
.mypdc-sort-bar select, .mypdc-sort-bar button { font-size: 13px; }

/* 不固定“搜索列表 + 宠物信息”这一块：它太高，会挡住下面的详细信息 */
body.use-sticky .sticky-box { position: static !important; }

/* 宠物信息 + 能力值/技能 合成一张卡片 */
body.mypdc-merged-card .edit-box .monsterinfo-box {
	margin-top: 8px;
	border: #FFDA70 solid 2px;
	border-bottom: none;
	border-radius: 15px 15px 0 0;
	box-shadow: none;
}
body.mypdc-merged-card .edit-box .setting-box .ability-box {
	border-top: #B1BB39 solid 3px;
	border-radius: 0 0 15px 15px;
}

.search-box .sort-div::before, .search-box .sort-div::after { content: none !important; display: none !important; }
/* “关闭搜索 / 清空搜索 / 分享搜索”这一排不需要：折叠标题可关闭，各栏有自己的清除按钮 */
.search-box .control-div > .button-div { display: none !important; }

/* ---------- 觉醒赋予 ---------- */
.mypdc-impart-toggle { margin-left: 8px; font-size: 15px; white-space: nowrap; }
.mypdc-impart-filter { margin: 6px 0 2px; padding-top: 4px; border-top: 1px dashed var(--mypdc-line); }
.mypdc-impart-filter .mypdc-hint { margin: 0; }
.mypdc-impart-icons { display: flex; flex-wrap: wrap; gap: 3px; margin-left: 5.5em; }
.mypdc-impart-icon {
	cursor: pointer;
	opacity: 0.45;
	zoom: 0.85;
	border-radius: 6px;
}
.mypdc-impart-icon.on { opacity: 1; outline: 3px solid #ff9800; }
/* 队员觉醒里由武器赋予的觉醒 */
.awoken-icon.mypdc-imparted { outline: 2px solid #ff9800; border-radius: 4px; }
@media (max-width: 760px) { .mypdc-impart-icons { margin-left: 0; } }
body.mypdc-listview .mypdc-list-wrap.mypdc-empty { display: none; }

/* ---------- 宠物详情：精简，手机上尽量一屏放下 ---------- */
/* 不显示：需要经验值、Lv1～Lv99 等级按钮、消耗、加蛋 ×0 */
.edit-box .row-mon-level .m-level-exp,
.edit-box .row-mon-level .subrow:nth-child(2),
.edit-box .row-mon-cost,
.edit-box .row-mon-plus .m-plus-fast-setting[value="0"] { display: none !important; }
/* 三维 | 加蛋 | ×1 ×3（竖排） | 等级 排成一行 */
.edit-box .setting-box .row-ability { display: flex; align-items: flex-start; gap: 6px; flex-wrap: nowrap; }
.edit-box .row-mon-plus { display: flex !important; align-items: flex-start; gap: 4px; }
.edit-box .row-mon-plus::before { display: none !important; }
.edit-box .row-mon-plus .m-plus-fast-setting { display: block; height: 28px; min-width: 34px; margin: 2px 0; }
.edit-box .row-mon-plus .m-plus-fast-setting[value="1"] { margin-top: calc(var(--char-border-width, 3px) + 2px); }
.edit-box .row-mon-plus { flex-wrap: wrap; width: min-content; }
.edit-box .row-mon-plus .plus-box { flex: none; }
.edit-box .row-mon-plus { display: grid !important; grid-template-columns: auto auto; grid-template-rows: auto auto 1fr; column-gap: 4px; }
.edit-box .row-mon-plus .plus-box { grid-row: 1 / 4; }
.edit-box .row-mon-level { margin-left: 4px !important; }

/* 技能说明：默认不显示图标和 6 格队伍位置标记，文字已能表达意思 */
body:not(.mypdc-skill-icons) .edit-box .skill-datail-parsed :is(.team-flags, icon.icon-skill, icon.attr-icon, icon.awoken-icon, icon.type-icon),
body:not(.mypdc-skill-icons) .edit-box .skill-datail-parsed icon.orb:not(.board icon.orb) { display: none !important; }
/* 盘面示意图缩小 */
.edit-box .skill-datail-parsed .board-set { zoom: 0.6; }
/* 合并后的随机技能 */
.mypdc-random-inline { margin: 2px 0 2px 1em; padding-left: 0.6em; border-left: 3px solid #c9a86a; }
.mypdc-random-inline > li { margin: 2px 0; }
.mypdc-random-inline .card-skill-list { margin: 0; }
/* 三维数值不换行；等级框收窄 */
.edit-box .row-mon-ability { flex: none; }
.edit-box .row-mon-ability li { white-space: nowrap; }
.edit-box .row-mon-level .m-level { width: 3.2em; }
.edit-box .row-mon-level .subrow:first-child { white-space: nowrap; }
/* 合并后的随机选项里不显示示意盘面（随机产珠的盘面只是举例） */
.mypdc-random-inline :is(.merge-board, .board-set) { display: none !important; }

/* 标题栏右侧“清空条件”，与左侧“取消”对称 */
.edit-box-title .mypdc-clear-all {
	position: absolute;
	right: 0;
	top: 0;
	font-size: 0.5em;
	color: #fff;
	font-weight: bold;
	text-shadow: black 1px 1px 0, black -1px -1px 0, black 1px -1px 0, black -1px 1px 0;
	cursor: pointer;
}

/* ---------- 搜索栏精简 ---------- */
/* 类型：AND/OR 开关放在“类型：”右边，图标换到下一行；去掉杀觉醒快捷按钮 */
.search-box .types-div { display: flex; flex-wrap: wrap; align-items: center; }
.search-box .types-div::before { order: 0; }
.search-box .types-div #type-and-or, .search-box .types-div label[for="type-and-or"] { order: 1; }
.search-box .types-div .type-list { order: 2; flex-basis: 100%; flex-wrap: wrap; }
.search-box .types-div .latent-ul { display: none !important; }
/* 去掉“使用官方觉醒排序”开关和快速开关一栏 */
#show-official-awoken-sorting, label[for="show-official-awoken-sorting"],
.search-box .fast-switch { display: none !important; }
/* 觉醒搜索选项 */
.mypdc-awoken-opts { margin: 4px 0; font-size: 0.95em; }
/* 统一后的开关：文字与开关之间留点空隙 */
input[type="checkbox"].switch-ipt + label[for^="mypdc-sw-"]::before { margin-right: 4px; }

/* ---------- 队伍库 ---------- */
html.mypdc-team-loading body { opacity: 0.3; pointer-events: none; }
.mypdc-team-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.mypdc-team-buttons button { font-size: 15px; padding: 4px 12px; cursor: pointer; }
.mypdc-team-banner {
	margin: 6px 0; padding: 8px 10px; border-radius: 8px;
	background: #fff8e1; color: #333; border: 1px solid #ffcc80; font-size: 14px;
}
.mypdc-team-banner-title b { font-size: 16px; }
.mypdc-team-meta { color: #888; font-size: 12px; }
.mypdc-team-note { white-space: pre-wrap; margin-top: 4px; font-size: 13px; }
.mypdc-team-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mypdc-team-banner button { cursor: pointer; padding: 3px 10px; }
.mypdc-team-field { display: block; margin: 10px 0; }
.mypdc-team-field > span { display: block; font-weight: bold; margin-bottom: 4px; }
.mypdc-team-field input, .mypdc-team-field textarea { width: 100%; box-sizing: border-box; font-size: 16px !important; padding: 6px 8px !important; }
.mypdc-panel .mypdc-team-primary { background: var(--mypdc-accent); color: #fff; border-color: var(--mypdc-accent); font-weight: bold; }
.mypdc-panel .mypdc-team-actions button { font-size: 15px; padding: 6px 14px; }
.mypdc-team-msg { color: var(--mypdc-dead); margin: 6px 0; }
.mypdc-team-link input { width: 100%; box-sizing: border-box; font-size: 14px; padding: 6px; }
.mypdc-team-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mypdc-panel .mypdc-team-search { flex: 1; min-width: 0; font-size: 16px; padding: 6px 8px; }
.mypdc-team-item {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 4px; border-bottom: 1px solid var(--mypdc-line); cursor: pointer;
}
.mypdc-team-item:hover { background: var(--mypdc-soft); }
.mypdc-team-heads { flex: none; }
.mypdc-team-row { display: flex; gap: 1px; }
.mypdc-team-row + .mypdc-team-row { margin-top: 2px; }
.mypdc-team-head { display: inline-block; width: 40px; height: 40px; overflow: hidden; }
.mypdc-team-head > .monster { zoom: 0.4; pointer-events: none; }
.mypdc-team-info { flex: 1; min-width: 0; }
.mypdc-team-title { font-weight: bold; font-size: 15px; overflow-wrap: anywhere; }
.mypdc-team-id { color: #888; font-weight: normal; font-size: 12px; }
.mypdc-team-info .mypdc-team-note { color: #666; max-height: 2.8em; overflow: hidden; }
.mypdc-team-item-actions { display: flex; flex-direction: column; gap: 4px; flex: none; }
.mypdc-panel .mypdc-team-del.confirm { background: var(--mypdc-dead); color: #fff; }
.mypdc-team-empty { color: #888; padding: 16px 0; }
.mypdc-team-admin { margin-top: 16px; color: #888; font-size: 13px; }
.mypdc-team-admin input { margin: 0 6px; }
@media (max-width: 600px) {
	.mypdc-team-item { flex-wrap: wrap; }
	.mypdc-team-heads { order: 0; width: 100%; }
	.mypdc-team-head { width: 46px; height: 46px; }
	.mypdc-team-head > .monster { zoom: 0.46; }
	.mypdc-team-info { order: 1; }
	.mypdc-team-item-actions { order: 2; flex-direction: row; }
}
.mypdc-team-admin-view .mypdc-team-admin {
	margin: 0 0 12px; padding: 10px; border: 1px solid var(--mypdc-line); border-radius: 8px;
	color: inherit; font-size: 14px; background: var(--mypdc-soft);
}
.mypdc-team-login p { margin: 0 0 6px; }
.mypdc-panel .mypdc-team-login input { flex: 1; min-width: 0; font-size: 16px; padding: 6px 8px; margin: 0; }

/* ---------- 编队：选择要开的盾 / HP上限技能 ---------- */
.mypdc-skilluse { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 4px 0; font-size: 14px; }
.mypdc-skilluse-pick { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 14em; }
.mypdc-skilluse-pick > span { white-space: nowrap; }
/* 开技后改写过的 HP / 减伤 / 等效HP 用黄色显示 */
.tIf-total-hp.mypdc-skill-on .general, .tIf-total-hp.mypdc-skill-on .awoken-bind,
.tIf-total-hp.mypdc-skill-on .reduce-scale { color: #f57c00 !important; font-weight: bold; }
@media (max-width: 760px) {
	.mypdc-skilluse-pick { flex-basis: 100%; }
}
.mypdc-team-item.mypdc-team-opening { opacity: 0.5; }
.mypdc-team-opening-note {
	position: fixed; top: 40%; left: 50%; transform: translateX(-50%); z-index: 2000;
	padding: 12px 20px; border-radius: 10px; background: rgba(0,0,0,0.8); color: #fff; font-size: 16px;
}

/* ---------- 顶部控制栏精简 ---------- */
#btn-qrcode, #btn-player-data, #datasource-updatetime { display: none !important; }
body.mypdc-compact-top label[for="languages"]::after, body.mypdc-compact-top label[for="datasource"]::after { content: none !important; }
body.mypdc-compact-top .control-box > div, body.mypdc-compact-top .control-box .formation-control {
	display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 4px;
}
body.mypdc-compact-top .control-box button, body.mypdc-compact-top .control-box select {
	font-size: 14px !important; min-height: 30px !important; padding: 2px 8px; margin: 0;
}
body.mypdc-compact-top .control-box label { font-size: 14px; }
body.mypdc-compact-top .control-box .mypdc-impart-toggle { font-size: 14px; margin-left: 0; }
body.mypdc-compact-top .control-box details.config-display-list > summary { font-size: 14px; }
body.mypdc-compact-top .control-box .config-display-list .setting { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mypdc-footer { margin: 24px 8px 12px; text-align: center; }
.mypdc-footer .mypdc-credit { display: inline; font-size: 11px; color: #888; }
/* “解除辅助”改为“辅助失效”开关 */
#btn-remove-assist::after { content: "辅助失效" !important; }
#btn-remove-assist.mypdc-on { background: #c62828 !important; color: #fff !important; border-color: #8e0000 !important; }
/* 变身 / 辅助失效 / 地下城强化 / 赋予 放在同一行：缩短文字 */
body.mypdc-compact-top #lbl-henshin-change::after { content: none !important; }
body.mypdc-compact-top .control-box .btn-henshin { padding: 2px 6px; }
body.mypdc-compact-top #btn-set-dungeon-enchance::after { content: "地下城" !important; }
body.mypdc-compact-top .control-box .formation-control { gap: 4px; }
/* iOS Safari 的“文字自动放大”会在重绘后把部分文字（例如开技下拉框）放大：关掉 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* 开技选择（自制下拉） */
.mypdc-dd { position: relative; flex: 1; min-width: 0; font-size: 14px; }
.mypdc-dd > summary {
	list-style: none; cursor: pointer; padding: 3px 24px 3px 8px; border: 1px solid #999; border-radius: 6px;
	background: rgba(255, 255, 255, 0.9); color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.mypdc-dd > summary::-webkit-details-marker { display: none; }
.mypdc-dd > summary::after { content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.mypdc-dd.mypdc-dd-on > summary { background: #fff3e0; border-color: #f57c00; font-weight: bold; }
.mypdc-dd.mypdc-dd-disabled > summary { opacity: 0.55; cursor: default; }
.mypdc-dd-list {
	position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 50; max-height: 260px; overflow: auto;
	background: #fff; color: #222; border: 1px solid #999; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.mypdc-dd-list button {
	display: block; width: 100%; text-align: left; border: none; border-bottom: 1px solid #eee; background: none; color: inherit;
	padding: 8px 10px; font-size: 14px; cursor: pointer;
}
.mypdc-dd-list button:hover { background: #fff3e0; }
.mypdc-dd-list button.mypdc-dd-cur { font-weight: bold; color: #e65100; }

/* 修改队名、说明时不弹出辅助输入工具条 */
#rich-text-tools { display: none !important; }

/* 手机：徽章选择窗口缩小，一页放下全部徽章 */
@media (max-width: 700px) {
	#badge-choose { max-width: calc(100vw - 16px); padding: 6px; box-sizing: border-box; }
	#badge-choose .team-badges {
		grid-template-columns: repeat(8, 1fr);
		grid-gap: 4px 2px;
		margin: 4px 0;
		justify-items: center;
	}
	#badge-choose .team-badges .badge {
		transform: scale(0.36);
		margin: calc(var(--badge-height) * -0.32) calc(var(--badge-width) * -0.32);
	}
	#badge-choose .team-badges input:checked + .badge { outline-width: 14px; }
	#badge-choose .dialog-control { margin-top: 4px; }
}
/* 减伤模拟按钮：固定在队伍标题右边 */
.formation-box .title-box { display: flex; align-items: center; gap: 8px; }
.formation-box .title-box > .title-display, .formation-box .title-box > .title-code { flex: 1; min-width: 0; }
.mypdc-open-btn.mypdc-open-inline {
	position: static; flex: none; box-shadow: none; padding: 5px 12px; font-size: 14px;
	width: auto !important; height: auto !important; border-radius: 16px !important;
}
.mypdc-open-btn.mypdc-open-inline { font-size: 14px !important; }
.mypdc-open-btn.mypdc-open-inline::before { content: none !important; }
/* 搜索结果数量：浮动显示，点一下跳到结果列表 */
.search-box .control-div .sort-div { display: none !important; }
.mypdc-result-fab {
	display: none; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 950;
	padding: 8px 18px; border: none; border-radius: 22px; font-size: 15px; font-weight: bold;
	background: #ff9800; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.35); cursor: pointer; white-space: nowrap;
}
.mypdc-result-fab.mypdc-show { display: block; }
.mypdc-result-fab.mypdc-none { background: #777; cursor: default; }
body.mypdc-panel-open .mypdc-result-fab { display: none; }
/* 类型 AND/OR：OR ◯ AND，当前生效的一边加粗 */
.search-box .types-div .mypdc-or-text { order: 1; margin-left: 10px; margin-right: 4px; opacity: 0.6; }
.search-box .types-div label[for="type-and-or"]::after { content: "AND" !important; opacity: 0.6; margin-left: 4px; }
.search-box .types-div:has(#type-and-or:not(:checked)) .mypdc-or-text { opacity: 1; font-weight: bold; }
.search-box .types-div #type-and-or:checked + label::after { opacity: 1; font-weight: bold; }
.search-box .types-div label[for="type-and-or"] { margin-left: 0 !important; }
/* “编辑界面使用侧栏模式 / 黏性定位”开关不需要 */
#use-side-mode, label[for="use-side-mode"], #use-sticky, label[for="use-sticky"] { display: none !important; }

/* ---------- 关卡伤害 ---------- */
.mypdc-dg-bar .mypdc-dg-select { flex: 1; min-width: 0; font-size: 15px; padding: 4px; }
.mypdc-dg-team { padding: 6px 8px; }
.mypdc-dg-hp { gap: 6px 12px; }
.mypdc-dg-use { color: #f57c00; font-weight: bold; }
.mypdc-dg-attrs { display: inline-flex; gap: 8px; font-size: 13px; }
.mypdc-dg-note { white-space: pre-wrap; color: #888; margin: 6px 0; }
.mypdc-dg-enemy-title { background: #b9b0e8; color: #222; padding: 4px 8px; font-weight: bold; margin-top: 8px; }
.mypdc-dg-enemy { display: flex; gap: 6px; align-items: flex-start; }
.mypdc-dg-head { flex: none; width: 56px; height: 56px; overflow: hidden; margin-top: 4px; }
.mypdc-dg-head > .monster { zoom: 0.56; pointer-events: none; }
.mypdc-dg-noicon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border: 2px solid currentColor; border-radius: 8px; font-weight: bold; font-size: 20px; }
.mypdc-dg-skills { flex: 1; min-width: 0; }
.mypdc-dg-skill { border-bottom: 1px solid var(--mypdc-line); padding: 3px 0; }
.mypdc-dg-skill-name { background: var(--mypdc-soft); padding: 2px 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mypdc-dg-pre .mypdc-dg-skill-name { color: #1e88e5; }
.mypdc-dg-pretag { font-size: 11px; border: 1px solid #1e88e5; border-radius: 4px; padding: 0 3px; }
.mypdc-dg-skill-note { color: #888; font-size: 12px; }
.mypdc-dg-skill-row { display: grid; grid-template-columns: 1fr auto 6.5em; align-items: center; gap: 6px; padding: 2px 6px; }
.mypdc-dg-raw { font-variant-numeric: tabular-nums; }
.mypdc-dg-need { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; white-space: nowrap; }
.mypdc-dg-latent { display: inline-block; width: 22px; height: 22px; overflow: hidden; margin-left: 4px; }
.mypdc-dg-latent .latent-icon { zoom: 0.6; }
.mypdc-dg-taken { text-align: right; font-weight: bold; font-variant-numeric: tabular-nums; }
.mypdc-dg-taken.ok { color: #2e9d3a; }
.mypdc-dg-taken.dead { color: #d32f2f; }
.mypdc-dg-tag { font-size: 11px; padding: 0 5px; border-radius: 8px; color: #fff; line-height: 1.6; border: none; }
.mypdc-dg-tag-red, .mypdc-panel .mypdc-dg-tag-red { background: #d32f2f; color: #fff; border-color: #d32f2f; }
.mypdc-dg-tag-purple, .mypdc-panel .mypdc-dg-tag-purple { background: #7b1fa2; color: #fff; border-color: #7b1fa2; }
.mypdc-dg-tag-orange, .mypdc-panel .mypdc-dg-tag-orange { background: #ef6c00; color: #fff; border-color: #ef6c00; }
.mypdc-dg-tag-blue, .mypdc-panel .mypdc-dg-tag-blue { background: #1565c0; color: #fff; border-color: #1565c0; }
.mypdc-dg-edit-tags .mypdc-dg-tag { opacity: 0.35; cursor: pointer; margin: 2px; font-size: 12px; padding: 2px 6px; }
.mypdc-dg-edit-tags .mypdc-dg-tag.on { opacity: 1; }
.mypdc-dg-edit-floor { border: 2px solid #b9b0e8; border-radius: 8px; padding: 6px; margin: 8px 0; }
.mypdc-dg-edit-enemy { border: 1px solid var(--mypdc-line); border-radius: 6px; padding: 6px; margin: 6px 0; }
.mypdc-dg-edit-skill { border-top: 1px dashed var(--mypdc-line); padding: 4px 0; }
.mypdc-dg-edit .mypdc-row { gap: 4px 8px; }
.mypdc-dg-field textarea, .mypdc-dg-json { width: 100%; box-sizing: border-box; }
.mypdc-panel .mypdc-dg-danger { color: #d32f2f; }
.mypdc-dg-edit-actions { position: sticky; bottom: 0; background: var(--mypdc-bg); padding: 6px 0; }
/* 底部：推荐添加到主屏幕（只在手机上显示） */
.mypdc-install { display: none; }
@media (max-width: 760px), (pointer: coarse) {
	.mypdc-install:not([hidden]) {
		display: block; margin: 24px 12px 0; padding: 12px 14px; border-radius: 12px;
		background: rgba(255, 255, 255, 0.92); color: #333; font-size: 14px; line-height: 1.5;
	}
}
.mypdc-install-title { font-weight: bold; font-size: 15px; margin-bottom: 4px; }
.mypdc-install p { margin: 4px 0 8px; }
.mypdc-install-icon { display: inline-block; margin: 0 3px; padding: 0 3px; border: 1.5px solid #1e88e5; border-radius: 4px; color: #1e88e5; font-weight: bold; line-height: 1.2; }
.mypdc-install-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mypdc-install-actions button { font-size: 15px; padding: 6px 14px; border-radius: 18px; border: 1px solid #bbb; background: #f4f4f6; cursor: pointer; }
.mypdc-install-actions .mypdc-install-primary { background: #1e88e5; color: #fff; border-color: #1e88e5; font-weight: bold; }
.mypdc-footer { margin-top: 8px !important; }
.mypdc-dg-enemy-title { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mypdc-dg-stagehp { font-weight: normal; }
