@charset "utf-8";
/*!
 * 打工人工具箱 - 站点样式
 * 视觉规范与主站 789.work（打工人导航 / OneNav 主题）保持一致
 * 主题色 #f1404b   页面底色 #f2f4f7   卡片 #ffffff   正文 #484b4f
 * 字体全部使用系统内置字体，不加载任何第三方网络字体，无字版权风险
 */

:root {
    --theme-color: #f1404b;
    --hover-color: #d12768;
    --focus-shadow: rgba(220, 65, 75, .22);
    --main-color: #484b4f;
    --title-color: #2b2d31;
    --muted-color: #93959a;
    --main-bg-color: #ffffff;
    --body-bg-color: #f2f4f7;
    --muted-bg-color: #e6e8ea;
    --muted-bg-color-l: #f1f2f4;
    --line-color: #e9ebee;
    --input-bg: #f5f6f8;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(24, 28, 33, .05), 0 6px 18px rgba(24, 28, 33, .045);
    --shadow-hover: 0 4px 12px rgba(24, 28, 33, .08), 0 12px 30px rgba(24, 28, 33, .07);
    --header-h: 58px;
    --font: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, "Courier New", monospace;
}

html[data-theme="dark"] {
    --main-color: #c3c7cd;
    --title-color: #f0f2f5;
    --muted-color: #8b8f96;
    --main-bg-color: #2d2e2f;
    --body-bg-color: #1b1d1f;
    --muted-bg-color: #24262a;
    --muted-bg-color-l: #1b1c1e;
    --line-color: #3a3c40;
    --input-bg: #333538;
    --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .3);
}

* { -webkit-box-sizing: border-box; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.7;
    color: var(--main-color);
    background-color: var(--body-bg-color);
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
}

a { color: var(--main-color); text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-color); text-decoration: none; }
img { max-width: 100%; border: 0; vertical-align: middle; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; color: var(--title-color); line-height: 1.4; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line-color); margin: 18px 0; }
::selection { background: var(--theme-color); color: #fff; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------------- 顶部导航 ---------------- */
.hd {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line-color);
    transition: background-color .3s, border-color .3s;
}
html[data-theme="dark"] .hd { background: rgba(45, 46, 47, .86); }
.hd-top { height: var(--header-h); }
.hd-top .wrap { display: flex; align-items: center; height: 100%; gap: 14px; }
.hd-logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--title-color); white-space: nowrap; }
.hd-logo:hover { color: var(--theme-color); }
.hd-logo .dot {
    width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
    background: linear-gradient(135deg, #f1404b, #d12768);
    color: #fff; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hd-search { flex: 1 1 auto; max-width: 340px; position: relative; margin-left: auto; }
.hd-search input {
    width: 100%; height: 36px; padding: 0 36px 0 14px;
    border: 1px solid transparent; border-radius: 18px;
    background: var(--muted-bg-color-l); color: var(--main-color);
    font-family: inherit; font-size: 13px; outline: none; transition: .2s;
}
.hd-search input:focus { background: var(--main-bg-color); border-color: var(--theme-color); box-shadow: 0 0 0 3px var(--focus-shadow); }
.hd-search .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-color); font-size: 14px; pointer-events: none; }
.hd-back {
    flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 17px;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--muted-bg-color-l); font-size: 13px; color: var(--main-color); white-space: nowrap;
}
.hd-back:hover { background: var(--theme-color); color: #fff; }
.hd-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hd-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-color);
    background: var(--main-bg-color); color: var(--muted-color); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px; transition: .2s;
}
.hd-btn:hover { color: var(--theme-color); border-color: var(--theme-color); }
.hd-nav { border-top: 1px solid var(--line-color); background: var(--main-bg-color); }
.hd-nav .wrap { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; height: 42px; }
.hd-nav .wrap::-webkit-scrollbar { display: none; }
.hd-nav a {
    flex: 0 0 auto; padding: 4px 11px; border-radius: 14px; font-size: 13px;
    white-space: nowrap; color: var(--main-color);
}
.hd-nav a:hover { background: var(--muted-bg-color-l); color: var(--theme-color); }
.hd-nav a.on { background: var(--theme-color); color: #fff; }

/* ---------------- 面包屑 ---------------- */
.crumb { padding: 16px 0 0; font-size: 13px; color: var(--muted-color); }
.crumb a { color: var(--muted-color); }
.crumb a:hover { color: var(--theme-color); }
.crumb span { margin: 0 6px; opacity: .6; }

/* ---------------- 通用卡片 ---------------- */
.card {
    background: var(--main-bg-color); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; border: 1px solid transparent;
}
.card + .card { margin-top: 16px; }

.pg-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pg-title h1 { font-size: 21px; }
.pg-title .tag {
    font-size: 12px; padding: 2px 9px; border-radius: 10px;
    background: var(--muted-bg-color-l); color: var(--muted-color); font-weight: 400;
}
.pg-desc { color: var(--muted-color); font-size: 13px; margin: 0; }

.panel-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--title-color); margin: 0 0 14px;
}
.panel-title::before {
    content: ""; width: 3px; height: 15px; border-radius: 2px;
    background: linear-gradient(180deg, #f1404b, #d12768);
}
.panel-title .sub { font-weight: 400; font-size: 12px; color: var(--muted-color); }

/* ---------------- 表单 ---------------- */
label.fl { display: block; font-size: 13px; margin-bottom: 6px; color: var(--title-color); font-weight: 500; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=date],
input[type=datetime-local], input[type=month], input[type=time], input[type=url], input[type=search], select, textarea {
    width: 100%; padding: 9px 12px; font-family: inherit; font-size: 14px; line-height: 1.5;
    color: var(--main-color); background: var(--input-bg);
    border: 1px solid transparent; border-radius: var(--radius-sm);
    outline: none; transition: border-color .2s, box-shadow .2s, background-color .2s;
    -webkit-appearance: none; appearance: none;
}
select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2393959a' d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 30px;
}
input:focus, select:focus, textarea:focus {
    background: var(--main-bg-color); border-color: var(--theme-color); box-shadow: 0 0 0 3px var(--focus-shadow);
}
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 13px; }
input[type=color] {
    width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-color);
    border-radius: var(--radius-sm); background: var(--main-bg-color); cursor: pointer;
}
input[type=range] { width: 100%; accent-color: var(--theme-color); }
input[type=checkbox], input[type=radio] { accent-color: var(--theme-color); margin-right: 5px; }
.fm-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.fm-row > .fm-col { flex: 1 1 160px; min-width: 0; }
.fm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.fm-inline label { font-size: 13px; cursor: pointer; }
.fm-tip { font-size: 12px; color: var(--muted-color); margin: 6px 0 0; }
.fm-group { margin-bottom: 14px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 38px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
    background: var(--muted-bg-color-l); color: var(--main-color);
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
    white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--muted-bg-color); color: var(--title-color); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--theme-color); color: #fff; }
.btn.primary:hover { background: var(--hover-color); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-color); }
.btn.ghost:hover { border-color: var(--theme-color); color: var(--theme-color); background: transparent; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ---------------- 结果区 ---------------- */
.result {
    margin-top: 16px; padding: 16px; border-radius: var(--radius);
    background: var(--muted-bg-color-l); border: 1px dashed var(--line-color);
}
.result.hide { display: none; }
.result .kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-color); font-size: 14px; }
.result .kv:last-child { border-bottom: 0; }
.result .kv .k { color: var(--muted-color); flex: 0 0 auto; }
.result .kv .v { text-align: right; font-weight: 600; color: var(--title-color); word-break: break-all; }
.result .kv .v.big { font-size: 17px; color: var(--theme-color); }

table.kv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv-table > tbody > tr > td, table.kv-table > tr > td { padding: 9px 10px; border-bottom: 1px solid var(--line-color); vertical-align: top; }
table.kv-table td.k { color: var(--muted-color); width: 118px; white-space: nowrap; }
table.kv-table td.v { font-weight: 600; color: var(--title-color); word-break: break-all; overflow-wrap: anywhere; }
@media (max-width:640px){ table.kv-table td.k { width: 96px; } }
.out-box {
    background: var(--main-bg-color); border: 1px solid var(--line-color); border-radius: var(--radius-sm);
    padding: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.7;
    white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow: auto; color: var(--main-color);
}
.out-box:empty::before { content: "结果将显示在这里"; color: var(--muted-color); font-family: var(--font); }
.note {
    border-left: 3px solid var(--theme-color); background: var(--muted-bg-color-l);
    padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px; color: var(--muted-color); margin: 14px 0 0;
}
.note b { color: var(--main-color); }
.err { color: var(--theme-color); font-size: 13px; }
.ok { color: #18a058; font-size: 13px; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line-color); padding-bottom: 10px; }
.tabs button {
    height: 32px; padding: 0 15px; border: 0; border-radius: 16px; cursor: pointer;
    background: var(--muted-bg-color-l); color: var(--main-color); font-family: inherit; font-size: 13px; transition: .2s;
}
.tabs button:hover { color: var(--theme-color); }
.tabs button.on { background: var(--theme-color); color: #fff; }
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ---------------- 表格 ---------------- */
.tb-wrap { overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-color); max-height: 620px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--main-bg-color); }
table.tb th, table.tb td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line-color); white-space: nowrap; }
table.tb th { background: var(--muted-bg-color-l); font-weight: 600; color: var(--title-color); position: sticky; top: 0; z-index: 2; }
table.tb tbody tr:hover { background: var(--muted-bg-color-l); }
table.tb td.mono { font-family: var(--mono); }
table.tb .center { text-align: center; }

/* ---------------- 首页 ---------------- */
.hero {
    background: linear-gradient(135deg, #f1404b 0%, #d12768 100%);
    color: #fff; padding: 34px 0 30px; position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
    border-radius: 50%; background: rgba(255, 255, 255, .09);
}
.hero::before {
    content: ""; position: absolute; left: -80px; bottom: -110px; width: 220px; height: 220px;
    border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 27px; letter-spacing: .5px; }
.hero p { color: rgba(255, 255, 255, .88); margin: 8px 0 18px; font-size: 14px; }
.hero-search { display: flex; gap: 10px; max-width: 560px; }
.hero-search input {
    height: 44px; border-radius: 22px; background: rgba(255, 255, 255, .96);
    border: 0; padding: 0 20px; font-size: 14px; color: #484b4f;
}
.hero-search input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .3); background: #fff; border: 0; }
.hero-search .btn { height: 44px; border-radius: 22px; background: rgba(0, 0, 0, .18); color: #fff; padding: 0 24px; }
.hero-search .btn:hover { background: rgba(0, 0, 0, .3); color: #fff; }
.hero-stat { display: flex; gap: 26px; margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .85); flex-wrap: wrap; }
.hero-stat b { color: #fff; font-size: 17px; margin-right: 3px; }

.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 4px; }
.cat-nav a {
    padding: 6px 14px; border-radius: 16px; background: var(--main-bg-color);
    font-size: 13px; box-shadow: var(--shadow); border: 1px solid transparent;
}
.cat-nav a:hover { color: var(--theme-color); border-color: var(--theme-color); }
.cat-nav a b { color: var(--muted-color); font-weight: 400; font-size: 12px; }

.sec { padding: 22px 0 0; scroll-margin-top: 120px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.sec-head h2::before {
    content: ""; width: 3px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #f1404b, #d12768);
}
.sec-head .cnt { font-size: 12px; color: var(--muted-color); background: var(--muted-bg-color-l); padding: 1px 9px; border-radius: 9px; }
.sec-head .more { margin-left: auto; font-size: 13px; color: var(--muted-color); }
.sec-head .more:hover { color: var(--theme-color); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.grid.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px;
    background: var(--main-bg-color); border-radius: var(--radius); box-shadow: var(--shadow);
    border: 1px solid transparent; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: rgba(241, 64, 75, .25); }
.tool .tb-ico {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--muted-bg-color-l); color: var(--theme-color); font-size: 15px; font-weight: 700;
}
.tool .tb-txt { min-width: 0; flex: 1 1 auto; }
.tool .tb-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--title-color); }
.tool:hover .tb-txt b { color: var(--theme-color); }
.tool .tb-txt span { display: block; font-size: 12px; color: var(--muted-color); line-height: 1.55; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------------- 工具页布局 ---------------- */
.main { padding: 0 0 40px; }
.layout { display: flex; gap: 20px; align-items: flex-start; margin-top: 14px; }
.layout .content { flex: 1 1 auto; min-width: 0; }
.layout .aside { flex: 0 0 268px; width: 268px; position: sticky; top: calc(var(--header-h) + 56px); }
.aside .card { padding: 16px; }
.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list li { border-bottom: 1px dashed var(--line-color); }
.aside-list li:last-child { border-bottom: 0; }
.aside-list a { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; }
.aside-list a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted-bg-color); flex: 0 0 5px; transition: background .2s; }
.aside-list a:hover::before { background: var(--theme-color); }
.aside-list a.on { color: var(--theme-color); font-weight: 600; }
.aside-list a.on::before { background: var(--theme-color); }

/* ---------------- 页脚 ---------------- */
.ft { background: var(--main-bg-color); border-top: 1px solid var(--line-color); padding: 26px 0 30px; margin-top: 20px; color: var(--muted-color); font-size: 12.5px; line-height: 1.85; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.ft-nav a { color: var(--main-color); font-size: 13px; }
.ft-nav a:hover { color: var(--theme-color); }
.ft-block { margin-bottom: 10px; }
.ft-block b { color: var(--title-color); font-weight: 600; }
.ft-disc { padding: 11px 14px; background: var(--muted-bg-color-l); border-radius: var(--radius-sm); margin-bottom: 10px; }
.ft-copy { border-top: 1px solid var(--line-color); padding-top: 12px; }
.ft-copy a { color: var(--theme-color); }

/* ---------------- 其它 ---------------- */
.toast {
    position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
    background: rgba(43, 45, 49, .94); color: #fff; padding: 9px 20px; border-radius: 20px;
    font-size: 13px; opacity: 0; pointer-events: none; transition: .28s; z-index: 200; max-width: 82vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; color: var(--muted-color); padding: 40px 0; font-size: 14px; }
.mono-txt { font-family: var(--mono); font-size: 13px; }
.center { text-align: center; }
.mt0 { margin-top: 0 !important; }
.mb0 { margin-bottom: 0 !important; }
.hide { display: none !important; }
.flex { display: flex; }
.between { justify-content: space-between; }
.items { align-items: center; }
.gap8 { gap: 8px; }
.wrapflex { flex-wrap: wrap; }
.fs12 { font-size: 12px; }
.muted { color: var(--muted-color); }

.swatch { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch .sw { width: 92px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-color); cursor: pointer; }
.swatch .sw .c { height: 54px; }
.swatch .sw .t { padding: 5px 7px; font-size: 11px; text-align: center; background: var(--main-bg-color); font-family: var(--mono); }

.code-block {
    background: var(--muted-bg-color-l); border: 1px solid var(--line-color); border-radius: var(--radius-sm);
    padding: 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow: auto;
}

.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .12); vertical-align: -2px; }

/* ---------------- 头部搜索结果 ---------------- */
.search-pop {
    position: absolute; left: 0; right: 0; top: 44px; z-index: 80;
    background: var(--main-bg-color); border: 1px solid var(--line-color);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: 6px; max-height: 60vh; overflow: auto;
}
.search-pop a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); }
.search-pop a:hover { background: var(--muted-bg-color-l); }
.search-pop a b { display: block; font-size: 13.5px; font-weight: 600; color: var(--title-color); }
.search-pop a:hover b { color: var(--theme-color); }
.search-pop a span { display: block; line-height: 1.5; }

/* ---------------- 分类页 ---------------- */
.cat-head {
    display: flex; align-items: center; gap: 14px; padding: 20px 22px;
    background: linear-gradient(135deg, #f1404b 0%, #d12768 100%); color: #fff;
    border-radius: var(--radius); margin-top: 14px;
}
.cat-head .ico {
    width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px;
    background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
}
.cat-head h1 { color: #fff; font-size: 20px; }
.cat-head p { margin: 3px 0 0; color: rgba(255, 255, 255, .88); font-size: 13px; }
.cat-head .cnt { margin-left: auto; font-size: 13px; background: rgba(255, 255, 255, .2); padding: 3px 12px; border-radius: 12px; white-space: nowrap; }

.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }
.tool-list .tool { align-items: center; }
.tool-list .tool .tb-txt span { -webkit-line-clamp: 2; }

/* ---------------- 提示行 ---------------- */
.alert {
    display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm);
    background: var(--muted-bg-color-l); border-left: 3px solid var(--muted-color);
    font-size: 13px; color: var(--muted-color); margin-bottom: 14px;
}
.alert.warn { border-left-color: var(--theme-color); }
.alert b { color: var(--main-color); }

/* ---------------- 进度条 ---------------- */
.bar { height: 8px; border-radius: 4px; background: var(--muted-bg-color); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #f1404b, #d12768); width: 0; transition: width .2s; }

/* ---------------- 大号文本域 ---------------- */
textarea.lg { min-height: 220px; }
textarea.xl { min-height: 320px; }

/* ---------------- 色块网格 ---------------- */
.grid-color { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.grid-color .gc { border: 1px solid var(--line-color); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--main-bg-color); }
.grid-color .gc .c { height: 62px; }
.grid-color .gc .t { padding: 4px 6px; font-size: 11px; font-family: var(--mono); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 特殊符号 / emoji 面板 ---------------- */
.sym-cell {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1 / 1; border-radius: var(--radius-sm); border: 1px solid var(--line-color);
    background: var(--main-bg-color); font-size: 21px; cursor: pointer; transition: .15s;
    user-select: none; overflow: hidden;
}
.sym-cell:hover { border-color: var(--theme-color); background: var(--muted-bg-color-l); transform: scale(1.06); }
.grid-sym { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.grid-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }

/* ---------------- 图片类工具：拖拽上传与预览 ---------------- */
.drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 30px 18px; text-align: center; cursor: pointer;
    border: 2px dashed var(--line-color); border-radius: var(--radius);
    background: var(--muted-bg-color-l); color: var(--muted-color); font-size: 13px;
    transition: border-color .2s, background-color .2s, color .2s;
}
.drop:hover { border-color: var(--theme-color); color: var(--main-color); }
.drop.over { border-color: var(--theme-color); background: rgba(241, 64, 75, .06); color: var(--theme-color); }
.drop .di { font-size: 26px; line-height: 1; color: var(--theme-color); }
.drop b { color: var(--title-color); font-size: 14px; font-weight: 600; }

.imgbox {
    border: 1px solid var(--line-color); border-radius: var(--radius-sm); overflow: auto;
    background-color: var(--main-bg-color); max-height: 520px; padding: 8px;
    background-image:
        linear-gradient(45deg, var(--muted-bg-color) 25%, transparent 25%, transparent 75%, var(--muted-bg-color) 75%),
        linear-gradient(45deg, var(--muted-bg-color) 25%, transparent 25%, transparent 75%, var(--muted-bg-color) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}
.imgbox.center { display: flex; align-items: center; justify-content: center; }
.imgbox img, .imgbox canvas { display: block; max-width: 100%; height: auto; }
.imgbox.center img, .imgbox.center canvas { margin: 0 auto; }

.preview-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-2 .pv { min-width: 0; }
.preview-2 .pv .cap {
    font-size: 12px; color: var(--muted-color); margin-bottom: 6px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.preview-2 .pv .cap b { color: var(--title-color); font-weight: 600; }

.range-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.range-row > label { flex: 0 0 auto; min-width: 88px; font-size: 13px; color: var(--title-color); font-weight: 500; }
.range-row > input[type=range] { flex: 1 1 auto; }
.range-row > .rv {
    flex: 0 0 auto; min-width: 58px; text-align: right; font-family: var(--mono);
    font-size: 13px; color: var(--theme-color); font-weight: 600;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
    font-size: 12px; padding: 2px 9px; border-radius: 10px;
    background: var(--muted-bg-color-l); color: var(--muted-color);
}
.pill.on { background: var(--theme-color); color: #fff; }

.file-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted-color); margin-top: 10px; }
.file-meta b { color: var(--title-color); font-family: var(--mono); font-weight: 600; }

.pick-cursor { cursor: crosshair; }
.pick-cursor canvas { cursor: crosshair; }

@media (max-width: 700px) {
    .preview-2 { grid-template-columns: 1fr; }
    .range-row > label { min-width: 72px; font-size: 12px; }
}

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .layout .aside { position: static; width: 100%; flex: 1 1 auto; }
    .hero h1 { font-size: 22px; }
    .hero { padding: 26px 0 24px; }
    .hd-search { max-width: none; }
    .pg-title h1 { font-size: 18px; }
    .card { padding: 16px; }
}
@media (max-width: 620px) {
    .hd-logo span.tx { display: none; }
    .hd-back span.tx { display: none; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .tool .tb-txt span { -webkit-line-clamp: 1; }
    .hero-search { flex-direction: column; }
    .hero-search .btn { width: 100%; }
}
@media print {
    .hd, .ft, .aside, .tabs, .btn { display: none !important; }
    body { background: #fff; }
}
