* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #0d1424; color: #e8ecf4; font: 14px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #11192e; border-bottom: 1px solid #22304f; flex-wrap: wrap; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-logo.right { margin-left: auto; height: 38px; }
.topbar .back { color: #ffb347; text-decoration: none; }
.topbar .title strong { font-size: 16px; }
.topbar .meta, .meta { color: #93a3c0; margin-left: 8px; font-size: 12px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
a.btn { text-decoration: none; display: inline-block; }
.btn { background: #1d2a47; color: #e8ecf4; border: 1px solid #31456e; border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: #ffb347; }
.btn.primary { background: #d9480f; color: #fff; border: none; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.wide { width: 100%; }
.file-btn { display: inline-block; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; padding: 14px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.drop { border: 1.5px dashed #31456e; border-radius: 10px; padding: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #111a30; }
.drop.over { border-color: #ff7a18; }
.stage { margin-top: 12px; }
.canvas-box { position: relative; max-width: 760px; margin: 0 auto; background: repeating-conic-gradient(#1a2745 0 25%, #141f38 0 50%) 0 0/24px 24px; border: 1px solid #2a3a5f; border-radius: 10px; overflow: hidden; line-height: 0; }
.canvas-box img { width: 100%; height: auto; display: block; }
.compare { position: absolute; inset: 0; }
.compare img { width: 100%; height: 100%; object-fit: cover; }
#compareRange { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 8; }
#cornerLayer { position: absolute; inset: 0; z-index: 6; }
.corner { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #ff7a18; border: 2px solid #fff2df; cursor: grab; z-index: 7; }
#maskCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; touch-action: none; }
.stage-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px auto 0; max-width: 760px; align-items: center; }
.stage-bar .meta { margin-left: 0; margin-right: auto; }
.hint { color: #93a3c0; font-size: 12px; }
.panel { display: flex; flex-direction: column; gap: 12px; }
.card { background: #131e36; border: 1px solid #24365c; border-radius: 10px; padding: 12px 14px; }
.card h2 { margin: 0 0 10px; font-size: 14px; }
.tool-list { display: flex; flex-direction: column; gap: 8px; }
.tool-head { text-align: left; background: #1d2a47; }
.tool-body { padding: 10px 2px 2px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 6px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 label, label.block { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #aeb9d0; margin-bottom: 8px; }
input[type="number"], select, textarea { background: #0d1424; border: 1px solid #31456e; color: #e8ecf4; border-radius: 6px; padding: 6px 8px; width: 100%; font: inherit; }
.slider-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #aeb9d0; margin: 4px 0 10px; }
.slider-row input { flex: 1; }
.swatches { margin-top: 10px; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #31456e; cursor: pointer; padding: 0; }
.sw.transparent { background: repeating-conic-gradient(#3a4a6e 0 25%, #22304f 0 50%) 0 0/10px 10px; }
#cutBgColor { width: 34px; height: 24px; padding: 0; }
.noui-host { margin: 8px 2px 4px; }
.noUi-target { height: 10px; }
.noUi-handle { width: 26px !important; height: 26px !important; top: -9px !important; border-radius: 50%; }
