/* pinyin-wubi 汉字转拼音五笔工具页专属样式(uidemo tool-pinyin-wubi v2 定稿移植, pw- 前缀沙盒)。
   双栏: 左主栏(输入+选项卡+三结果卡+对照表+FAQ+相关工具+md 文档), 右栏 300px widget;
   色彩融入站内 Infima 主色体系(蓝 #3578e5), 三结果卡用 蓝/橙/靛 圆点编码。 */

/* ---------- 页面骨架 ---------- */
.pw-page-body { background: #f6f7f9; }
.pw-page { min-height: 60vh; padding: 20px 0 64px; }
.pw-layout { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr; gap: 22px; }
.pw-main { min-width: 0; display: flex; flex-direction: column; }
.pw-side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 996px) { .pw-layout { grid-template-columns: minmax(0, 1fr) 300px; } }

.pw-crumb { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.pw-crumb a { color: #6b7280; text-decoration: none; }
.pw-crumb a:hover { color: #3578e5; }
.pw-crumb-sep { margin: 0 7px; color: #d1d5db; }
.pw-titlebox h1 { font-size: 26px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; color: #111827; }
.pw-titlebox p { font-size: 14px; color: #6b7280; margin: 0 0 18px; line-height: 1.7; }
.pw-hero-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; vertical-align: 1px; }
.pw-hero-badges span { font-size: 11.5px; color: #3d5a8a; background: #ebf2fc; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }

.pw-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.pw-block { margin-bottom: 24px; }
.pw-block-head h2 { font-size: 18px; margin: 0 0 12px; font-weight: 600; }

/* ---------- 输入区 ---------- */
.pw-input-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.pw-in-label { font-size: .9rem; font-weight: 600; color: #111827; }
.pw-input-ops { display: flex; align-items: center; gap: 10px; }
.pw-count { font-size: 12.5px; color: #6b7280; }
.pw-count b { color: #2d66c3; }
.pw-mini { padding: 4px 12px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; cursor: pointer; font-size: 12px; color: #374151; transition: all .15s; }
.pw-mini:hover { border-color: #3578e5; color: #3578e5; }
.pw-textarea { width: 100%; box-sizing: border-box; min-height: 96px; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: .95rem; font-family: inherit; line-height: 1.7; resize: vertical; background: #fafafa; color: #111827; }
.pw-textarea:focus { outline: 2px solid rgba(53,120,229,.35); border-color: #3578e5; background: #fff; }

/* ---------- 设置选项卡(紧凑 2×2) ---------- */
.pw-opt-card { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; padding: 13px 16px; }
.pw-opt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.pw-opt-label { font-size: 12px; color: #6b7280; flex: none; white-space: nowrap; }
.pw-opt-hint { display: none; }
.pw-seg { display: inline-flex; border: 1px solid #d1d5db; border-radius: 7px; overflow: hidden; background: #fff; }
.pw-seg button { border: none; background: none; padding: 4px 10px; font-size: 12px; color: #4b5563; cursor: pointer; border-right: 1px solid #e5e7eb; transition: all .15s; line-height: 1.3; text-align: center; }
.pw-seg button:last-child { border-right: none; }
.pw-seg button i { display: block; font-style: normal; font-size: 10.5px; color: #9ca3af; }
.pw-seg button.on { background: #3578e5; color: #fff; }
.pw-seg button.on i { color: rgba(255,255,255,.75); }
.pw-seg button:not(.on):hover { color: #3578e5; }

/* ---------- 三卡结果板 ---------- */
.pw-board { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
@media (min-width: 1180px) { .pw-board { grid-template-columns: repeat(3, 1fr); } }
.pw-res { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; transition: all .15s; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.pw-res:hover { border-color: #c3d9f5; box-shadow: 0 2px 12px rgba(53,120,229,.08); }
.pw-res-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.pw-res-name { font-size: .88rem; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 7px; }
.pw-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.pw-dot-py { background: #3578e5; }
.pw-dot-jy { background: #b45309; }
.pw-dot-wb { background: #4338ca; }
.pw-res-ops { display: flex; align-items: center; gap: 8px; }
.pw-copy { padding: 4px 13px; border: none; border-radius: 7px; background: #ebf2fc; color: #2d66c3; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.pw-copy:hover { background: #3578e5; color: #fff; }
.pw-res-body { flex: 1; min-height: 120px; display: flex; flex-wrap: wrap; gap: 12px 4px; align-content: flex-start; line-height: 1.45; max-height: 280px; overflow-y: auto; }
.pw-res-body.pw-nosep { gap: 5px 0; }
.pw-res-body .pw-unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 1em; padding: 0 1px; }
.pw-res-body .pw-up { font-size: 12.5px; color: #2d66c3; font-family: Georgia, "PingFang SC", serif; white-space: nowrap; }
.pw-res-body .pw-down { font-size: 1.12rem; color: #111827; margin-top: 3px; }
.pw-res-body .pw-unit.poly .pw-up { color: #0d9488; cursor: pointer; border-bottom: 1px dashed #0d9488; font-weight: 600; }
.pw-res-body .pw-unit.poly .pw-up:hover { background: #f0fdfa; }
.pw-res-body .pw-pass { color: #9ca3af; align-self: flex-start; font-size: .85rem; padding-top: .2em; }
.pw-res-body .pw-unit .pw-up.mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; letter-spacing: 0; color: #4338ca; }
.pw-res-body .pw-join { align-self: center; color: #9ca3af; font-size: 12.5px; padding: 2px 1px 0; }
.pw-res-body-code .pw-unit .pw-down { font-size: 1.05rem; }
.pw-res-body::-webkit-scrollbar { width: 6px; }
.pw-res-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
.pw-res-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #f0f1f3; font-size: 11px; color: #9ca3af; }
.pw-tipbar { margin-top: 14px; text-align: center; font-size: 12px; color: #9ca3af; }

/* ---------- 三方案对照表 ---------- */
.pw-table-wrap { overflow-x: auto; padding: 6px 12px; }
.pw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pw-table th { background: #f9fafb; color: #6b7280; font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.pw-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; color: #6b7280; }
.pw-table td b { color: #1f2937; }
.pw-table tr:last-child td { border-bottom: none; }
.pw-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------- 相关工具 ---------- */
.pw-related { display: flex; gap: 10px; flex-wrap: wrap; }
.pw-rel { font-size: 13px; color: #374151; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 14px; text-decoration: none; transition: all .15s; }
.pw-rel:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }

/* ---------- 底部 md 文档 ---------- */
.pw-seo { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-top: 24px; }
.pw-seo h2 { font-size: 19px; font-weight: 700; color: #1f2937; margin: 22px 0 10px; }
.pw-seo h2:first-child { margin-top: 0; }
.pw-seo h3 { font-size: 16px; font-weight: 700; color: #1f2937; margin: 18px 0 8px; }
.pw-seo p { font-size: 14px; color: #4b5563; line-height: 1.8; margin: 0 0 10px; }
.pw-seo p b { color: #1f2937; }
.pw-seo ul, .pw-seo ol { margin: 0 0 10px; padding-left: 20px; }
.pw-seo li { font-size: 14px; color: #4b5563; line-height: 1.8; }
.pw-seo code { background: #f3f4f6; border-radius: 4px; padding: 1px 5px; font-size: 13px; }

/* ---------- 右栏 widget ---------- */
.pw-widget { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.pw-widget-title { font-size: .95rem; font-weight: 700; color: #111827; margin: 0 0 12px; }
.pw-side-note { font-size: 12px; color: #9ca3af; margin: 0 0 8px; line-height: 1.5; }
.pw-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pw-side-list li { display: flex; gap: 10px; align-items: flex-start; }
.pw-side-list b { display: block; font-size: .86rem; font-weight: 600; color: #111827; }
.pw-side-list li > div > span { display: block; font-size: 12px; color: #6b7280; margin: 2px 0 4px; line-height: 1.5; }
.pw-side-list code { background: #f2f3f5; border-radius: 4px; padding: 1px 6px; font-size: 12px; color: #1c1e21; word-break: break-all; }
.pw-side-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: #fff; background: #3578e5; }
.pw-side-ico-jy { background: #b45309; }
.pw-side-ico-wb { background: #4338ca; }

/* ---------- 读音候选浮层 & toast(JS 自建) ---------- */
.pw-pop { position: fixed; z-index: 999; display: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 28px rgba(17,24,39,.16); padding: 8px; min-width: 170px; }
.pw-pop h5 { margin: 2px 6px 8px; font-size: 12px; color: #9ca3af; font-weight: 600; }
.pw-pop button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 7px 10px; border-radius: 7px; font-size: .86rem; color: #374151; cursor: pointer; }
.pw-pop button:hover { background: #ebf2fc; color: #3578e5; }
.pw-pop button.cur { color: #3578e5; font-weight: 700; }
.pw-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; font-size: 13px; padding: 9px 22px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000; }
.pw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 窄屏回退 ---------- */
@media (max-width: 640px) {
    .pw-opt-card { grid-template-columns: 1fr; }
}
