input.rate-ranger[type='range'] {
    display: block;
    position: relative;
    left: 0;
    top: 0;
    width: calc(100% - 1em);
    margin: 1em .5em;
	/*background: #e0e0e0;*/
	background-color: #c0d0e0;
    height: .5em;
    border-radius: 99em;
    cursor: pointer;
}
.rate-ranger::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 1em 1em 0 0;
    border-color: Khaki transparent transparent transparent;
    right: 1.75em;
    bottom: calc(1em - .6em);
    z-index: 11;
}

.rate-ranger::after {
    content: "向左或向右控制\a來調整報讀語速";
    white-space: pre;
    display: block;
    padding: .25em .5em;
    position: absolute;
    border: 1px dotted #ccc;
    border-radius: .5em;
    background-color: Khaki;
    color: #000;
    opacity: 1;
    right: .75em;
    bottom: 1em;
    box-sizing: border-box;
}
#tts-settings-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-left: -1em;
    gap: 8px;
    margin-top: 10px;padding:.5em;
	/*
	background-image: radial-gradient(#ddd 1px, transparent 0);
	background-size: 5px 5px;
	background-image:
		repeating-linear-gradient(45deg, #fcfcfc 0px, #ccc 1px, transparent 1px, transparent 3px),
		repeating-linear-gradient(-45deg, #fcfcfc 0px, #ccc 1px, transparent 1px, transparent 3px);
	background: repeating-linear-gradient(60deg,#f0f0f3 0 15px,#f8fdff 0 30px);
	*/
	background-color:#f5f5f5;
}
}

#rate-ranger-box {}

/* 簡化3個重複的 label 樣式，合併撰寫 */
#voice-select,
label:has(> #auto-scroll-cb),
label:has(> #highlight-cb),
label:has(> #click-read-cb) {
    flex: 1 1 auto;
    min-width: 6.5em;
    /*border: 1px solid #dadce0;*/
	border: 1px solid #babcc0;
	background-color: #fff;
    border-radius: 9em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 4px; /* 內距 */
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
	position:relative;
}

/* Hover 狀態增加微陰影 */
label:has(> #auto-scroll-cb):hover,label:has(> #highlight-cb):hover,label:has(> #click-read-cb):hover {
    background-color: #f8f9fa;
}

/* 針對不同顏色邊框與文字狀態 */
label:has(> #auto-scroll-cb:checked) {/*background-color: #def;color: #0a73e8;*/}
label:has(> #highlight-cb:checked) {/*color: #d93025;background-color: #fce8e6;*/}
label:has(> #click-read-cb:checked) {/*color: #b06000;background-color: #fef7e0;*/}
#voice-select {
    border: 1px solid #dadce0;
    padding: 4px;
    border-radius: 4px;
    outline: none;
}
#voice-select:focus {border-color: #1a73e8;}

/* === Checkbox === */
#tts-settings-panel input[type="checkbox"] {
	/*
	position: relative;
	outline: none;
	*/
	position:absolute;left:.5em;
    appearance: none;
    -webkit-appearance: none;
    width: 1.5em;
    height: 1.5em;
    border: 1px solid #5f6368;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    background-color: transparent;
    display: inline-block;
    vertical-align: middle;
}

/* 依照不同的功能給予對應的勾選顏色 */
#tts-settings-panel input[type="checkbox"]#auto-scroll-cb:checked {background-color: #1a73e8;border-color: #1a73e8;}
#tts-settings-panel input[type="checkbox"]#highlight-cb:checked {background-color: #d93025;border-color: #d93025;}
#tts-settings-panel input[type="checkbox"]#click-read-cb:checked {background-color: #e28900;border-color: #e28900;}

/* 打勾符號 (使用 ::after 偽元素繪製) */
#tts-settings-panel input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 2px;
    width: 7px;
    height: 13px;
	border: solid #fff;
	/*filter:drop-shadow(0 0 6px #000);*/
    border-width: 0 3px 3px 0;
    transform: rotate(40deg);
}

/*************/
.click-to-read-active .tts-chunk { cursor: pointer; border-radius: 3px; transition: background-color 0.2s; }
.click-to-read-active .tts-chunk:hover { background-color: #f0f0f0; }
.tts-highlight { background-color: #ffeb3b; color: #000; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
