/* v415：僅作用於導覽入口與導覽視窗。 */
#sk-page-tour-entry{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto;font-size:16px}
#sk-page-tour-entry[hidden],.skpt-dialog [hidden]{display:none!important}
#sk-page-tour-entry button,.skpt-card button{font:inherit;min-height:42px;padding:8px 14px;border:1px solid #9dbbd4;border-radius:7px;background:#f2f8ff;color:#155b91;cursor:pointer;line-height:1.5}
#sk-page-tour-entry button:hover,.skpt-card button:hover{background:#e1effd}
.skpt-entry-message{font-size:15px;color:#526a7e;line-height:1.7}
.skpt-dialog{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;overflow:hidden!important;color:#243b50;font:16px/1.7 'Noto Sans TC',sans-serif}
.skpt-dialog::backdrop{background:transparent}
.skpt-highlight{position:fixed;box-sizing:border-box;border:3px solid #fff;border-radius:8px;box-shadow:0 0 0 100vmax #172638a6;pointer-events:none}
.skpt-highlight[hidden]{display:block!important;inset:0!important;width:100%!important;height:100%!important;background:#172638a6;border:0;box-shadow:none}
.skpt-card{position:fixed;box-sizing:border-box;padding:20px;background:#fff;border:1px solid #c4d5e4;border-radius:12px;box-shadow:0 10px 35px #10233840;overflow:auto;overscroll-behavior:contain}
.skpt-card .skpt-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;color:#526a7e}
.skpt-card h2{font-size:20px;font-weight:700;line-height:1.5;margin:14px 0 8px;color:#234c6f}
.skpt-card p{font-size:16px;line-height:1.8;margin:8px 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}
.skpt-card .skpt-notice{color:#995600;font-size:15px;margin:8px 0}.skpt-notice:empty{display:none}
.skpt-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
.skpt-card button.skpt-primary{background:#176ab0;color:white;border-color:#176ab0}.skpt-card button:disabled{opacity:.45;cursor:default}
#sk-page-tour-entry button:focus-visible,.skpt-card button:focus-visible{outline:3px solid #ffbf47;outline-offset:3px}
body.dark #sk-page-tour-entry button{background:#233f58;color:#d4eaff;border-color:#7699b5}body.dark .skpt-entry-message{color:#bacdde}
body.dark .skpt-card{background:#223448;color:#e8f0f8;border-color:#7591a9}body.dark .skpt-card h2{color:#c6e3ff}body.dark .skpt-card .skpt-bar{color:#bdcfdf}body.dark .skpt-card .skpt-notice{color:#ffd291}
@media(max-width:600px){#sk-page-tour-entry{width:100%;margin:4px 0 10px}.skpt-card{padding:16px}.skpt-card h2{font-size:19px}}

/* v415.1：入口位於複製連結右側；預覽標示使用眼睛。 */
#software-detail .detail-header-tools #sk-page-tour-entry{margin:0;gap:10px;width:auto;flex:0 1 auto}
#software-detail .detail-header-tools{column-gap:14px}
#software-detail .detail-header-tools #sk-page-tour-entry button{height:40px;min-height:40px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;margin:0;padding:6px 12px;font-size:16px}
.skpt-preview-icon{display:inline-flex;align-items:center;justify-content:center;color:#587b98;min-width:24px;min-height:24px;font-size:19px;vertical-align:middle}
body.dark .skpt-preview-icon{color:#bad9f3}
@media(max-width:600px){#software-detail .detail-header-tools{justify-content:flex-end;width:100%}#software-detail .detail-header-tools #sk-page-tour-entry{margin:0;width:auto}}

/* v415.2：預覽標示放在鈴鐺左側，由眼睛承接右側群組的自動留白。 */
#software-detail .badge-group>.skpt-preview-mode{margin-left:auto;margin-right:6px;flex:0 0 28px;min-height:38px}
#software-detail .badge-group>.skpt-preview-mode+.tooltip-container:nth-last-child(2){margin-left:0}

/* v415.3：兩個工具按鈕同為原導覽按鈕的 16px 字級。 */
#software-detail .detail-header-tools #detail-copy-link,
#software-detail .detail-header-tools #sk-page-tour-entry button{font-size:16px;line-height:1.5;gap:8px}
#software-detail .detail-header-tools #detail-copy-link>i,
#software-detail .detail-header-tools #sk-page-tour-entry button>i{font-size:1em}

/* v416：分類頁入口沿用導覽按鈕樣式，僅新增本頁入口區。 */
.category-reading-page #sk-page-tour-entry{justify-content:flex-end;margin:0 0 12px;width:100%}
.category-reading-page #sk-page-tour-entry>.skpt-preview-mode{margin:0 0 0 4px;flex:none}

/* v416.2：分類名稱與導覽同列，預覽眼睛位於導覽左側。 */
.category-reading-page .category-info{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-items:center}
.category-reading-page .category-info>h2{grid-column:1;grid-row:1;min-width:0}
.category-reading-page .category-info>#sk-page-tour-entry{grid-column:2;grid-row:1;margin:0;width:auto;justify-content:flex-end;gap:12px}
.category-reading-page .category-info>.stats-bar,.category-reading-page .category-info>.os-nav,.category-reading-page .category-info>.sub-category-list,.category-reading-page .category-info>.sort-options-bar{grid-column:1/-1}
.category-reading-page .category-info>#sk-page-tour-entry>.skpt-preview-mode{order:-1;margin:0;flex:none}
.category-reading-page #sk-page-tour-entry>button{display:inline-flex;align-items:center;gap:8px}
@media(max-width:640px){.category-reading-page .category-info{grid-template-columns:minmax(0,1fr)}.category-reading-page .category-info>#sk-page-tour-entry{grid-column:1;grid-row:2;margin:0 0 12px;justify-self:end}}

/* v417：其他頁面入口與位置選取工具；既有入口維持原位置。 */
#sk-page-tour-entry.skpt-generic-entry{grid-column:1/-1;justify-self:end;justify-content:flex-end;width:100%;margin:0 0 16px}
#sk-page-tour-entry.skpt-generic-entry .skpt-preview-mode{order:-1}
.skpt-picker-bar{position:fixed;z-index:2147483647;right:16px;top:16px;width:min(420px,calc(100vw - 32px));box-sizing:border-box;padding:18px;background:#fff;color:#29465d;border:2px solid #176ab0;border-radius:10px;box-shadow:0 5px 25px #17263844;font:16px/1.7 sans-serif}
.skpt-picker-bar p{margin:0 0 10px;font:inherit}.skpt-picker-bar button{font:inherit;padding:8px 12px;margin:4px 0 0 10px;border:1px solid #8eafcb;border-radius:6px;background:#f1f7fd;color:#155b91;cursor:pointer}.skpt-picker-bar button:disabled{opacity:.45}
.skpt-picker-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.skpt-picker-ring{position:fixed;z-index:2147483646;pointer-events:none;border:3px solid #176ab0;background:#176ab01c;border-radius:5px;box-sizing:border-box}

/* v417.1：可使用的位置為藍框，尚未辨識的位置為橙框。 */
.skpt-picker-ring[data-valid=false]{border-color:#b46b10;background:#b46b101a}

/* v417.3：逐層選取與下層項目選單。 */
.skpt-picker-bar{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.skpt-picker-children{display:flex;flex-direction:column;gap:6px;margin-top:12px;font:inherit}
.skpt-picker-children[hidden]{display:none!important}
.skpt-picker-children select{font:inherit;min-height:42px;width:100%;padding:7px 10px;border:1px solid #8eafcb;border-radius:6px;color:#29465d;background:#fff;box-sizing:border-box}

.skpt-entry-message[data-error=true]{color:#b21f29;border:1px solid #dc9298;background:#fff3f3;border-radius:6px;padding:8px 12px}
body.dark .skpt-entry-message[data-error=true]{color:#ffb3b8;border-color:#cd7c85;background:#442a31}

/* v417.5：箭頭與卡片分開繪製，避免被可捲動的說明內容裁切。 */
.skpt-arrow{position:fixed;box-sizing:border-box;width:14px;height:14px;background:#fff;border:solid #c4d5e4;transform:rotate(45deg);pointer-events:none}
.skpt-arrow[data-side=left]{border-width:0 0 1px 1px}
.skpt-arrow[data-side=right]{border-width:1px 1px 0 0}
.skpt-arrow[data-side=top]{border-width:1px 0 0 1px}
.skpt-arrow[data-side=bottom]{border-width:0 1px 1px 0}
body.dark .skpt-arrow{background:#223448;border-color:#7591a9}

/* v417.7：預覽以虛線顯示；固定選取維持實線，並列出位置層級。 */
.skpt-picker-ring[data-preview=true]{border-style:dashed}
.skpt-picker-bar .skpt-picker-location{padding:9px 12px;border:1px solid #b6cfe2;border-radius:6px;background:#edf6ff;font-size:15px;line-height:1.7;overflow-wrap:anywhere}
.skpt-picker-bar .skpt-picker-location[hidden]{display:none!important}
.skpt-picker-children small{font-size:14px;line-height:1.7;color:#526a7e}
