/* 配色与渐变工坊 */
.app-card--palette { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app-icon.pal-mini {
    border: 0; padding: 0; cursor: pointer; background: transparent; overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px rgba(15,23,42,.16), 0 1px 3px rgba(15,23,42,.12);
    transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.app-icon.pal-mini:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 14px 28px rgba(15,23,42,.22); }
.app-icon.pal-mini img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }

.pl-panel {
    position: relative; width: min(680px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
    border-radius: 16px; background: #fff; color: #1e293b;
    box-shadow: 0 28px 80px rgba(8,12,22,.34);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}
.pl-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid rgba(15,23,42,.06); gap: 12px; }
.pl-title { margin: 0; font-size: 15px; font-weight: 600; }
.pl-tabs { display: inline-flex; background: #f1f5f9; padding: 3px; border-radius: 10px; gap: 3px; margin-right: auto; }
.pl-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font: inherit; font-size: 12.5px; color: #64748b; cursor: pointer; font-weight: 500; }
.pl-tabs button.is-active { background: #fff; color: #7c3aed; box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.pl-body { padding: 18px 20px 20px; }
.pl-pane[hidden] { display: none; }
.pl-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.pl-preview {
    border-radius: 14px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 126px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
}
.pl-preview strong { font-size: 20px; }
.pl-preview p { margin: 6px 0 0; font-size: 13px; opacity: .9; }
.pl-wcag { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; font-weight: 600; }
.pl-badge { padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.22); backdrop-filter: blur(4px); }
.pl-inputs { display: flex; flex-direction: column; gap: 8px; }
.pl-row { display: flex; align-items: center; gap: 8px; }
.pl-row label { font-size: 12px; color: #64748b; width: 42px; flex-shrink: 0; }
.pl-row input[type="color"] { width: 34px; height: 32px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 2px; background: transparent; cursor: pointer; }
.pl-row input[type="text"] { flex: 1; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px; font-family: ui-monospace, monospace; font-size: 12.5px; background: #f8fafc; color: inherit; }
.pl-copy { border: 0; background: #f1f5f9; color: #334155; border-radius: 7px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.pl-copy:hover { background: #e2e8f0; }
.pl-sec-title { font-size: 12.5px; font-weight: 600; color: #64748b; margin: 0 0 10px; }
.pl-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pl-swatch {
    border: 0; border-radius: 10px; padding: 8px 6px; cursor: pointer; display: flex; flex-direction: column;
    align-items: center; gap: 4px; color: #fff; font: inherit; font-size: 11.5px; text-shadow: 0 1px 2px rgba(0,0,0,.28);
    transition: transform .15s ease;
}
.pl-swatch:hover { transform: translateY(-2px); }
.pl-swatch small { font-family: ui-monospace, monospace; font-size: 10px; opacity: .9; }
.pl-grad-stage { height: 148px; border-radius: 14px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08); }
.pl-grad-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; }
.pl-grad-ctrl input[type="color"] { width: 34px; height: 32px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 2px; background: transparent; cursor: pointer; }
.pl-grad-ctrl input[type="range"] { flex: 1; min-width: 120px; accent-color: #8b5cf6; }
.pl-css-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f1f5f9; margin-bottom: 14px; }
.pl-css-bar code { flex: 1; font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.pl-grad-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pl-grad-preset { height: 46px; border: 0; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(15,23,42,.08); transition: transform .15s ease; }
.pl-grad-preset:hover { transform: translateY(-2px); }
@media (max-width: 620px) { .pl-top-grid { grid-template-columns: 1fr; } .pl-swatches { grid-template-columns: repeat(3, 1fr); } }
:root[data-theme="dark"] .pl-panel { background: #1b1f26; color: #f1f5f9; }
:root[data-theme="dark"] .pl-head { border-bottom-color: rgba(255,255,255,.08); }
:root[data-theme="dark"] .pl-tabs, :root[data-theme="dark"] .pl-css-bar { background: rgba(255,255,255,.06); }
:root[data-theme="dark"] .pl-tabs button.is-active { background: #2d3440; color: #c084fc; }
:root[data-theme="dark"] .pl-row input[type="text"] { background: #242a34; border-color: rgba(255,255,255,.1); color: #f1f5f9; }
:root[data-theme="dark"] .pl-copy { background: rgba(255,255,255,.1); color: #e2e8f0; }
