.hk{margin:24px 0 40px}
.hk-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);gap:28px;align-items:start}
.hk-editor{min-width:0}
.hk-preview{position:sticky;top:120px;min-width:0}
.hk-preview-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin-bottom:8px}
.hk-preview-head span:first-child{font-weight:700}
.hk canvas{display:block;width:100%;max-width:460px;height:auto;margin:0 auto;border:1px solid var(--line-2);border-radius:8px;box-shadow:0 8px 30px #3028380f;cursor:pointer}
.hk fieldset{min-width:0;margin:0 0 20px;padding:16px 18px;border:1px solid var(--line-2);border-radius:12px}
.hk legend{padding:0 8px;font-size:17px;font-weight:700}
.hk label{display:block;font-size:13px;font-weight:700;margin:0 0 5px}
.hk input[type=text]{width:100%;min-width:0;box-sizing:border-box;padding:9px 10px;border:1px solid #b9b3bf;border-radius:7px;background:#fff;color:#302838;font:inherit;font-size:16px}
.hk input[type=text]:disabled{background:#f1eef3;color:#8d8494}
.hk input[type=color]{display:block;width:100%;height:44px;box-sizing:border-box;padding:3px;border:1px solid #b9b3bf;border-radius:7px;background:#fff;cursor:pointer}
.hk input[type=range]{width:100%;accent-color:var(--brand)}
.hk-note{font-size:12px;color:var(--muted);line-height:1.8;margin:8px 0 0}
.hk button,.hk .hk-btn{min-height:44px;padding:9px 14px;border:1px solid #c5b6d0;border-radius:8px;background:#fff;color:#493555;font:inherit;font-size:14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box}
.hk button:hover,.hk .hk-btn:hover{background:var(--brand-soft)}
.hk button:disabled{opacity:.45;cursor:default}
.hk button[aria-pressed=true]{outline:2px solid var(--brand);outline-offset:1px;background:var(--brand-soft)}
.hk .hk-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.hk .hk-primary:hover{background:var(--brand-dark)}
.hk .hk-xbtn{background:#0f1419;border-color:#0f1419;color:#fff}
.hk .hk-xbtn:hover{background:#333}
.hk-group{margin-top:16px}
.hk-group:first-of-type{margin-top:4px}
.hk-lbl{font-size:13px;font-weight:700;margin:0 0 6px}
.hk-choices{display:flex;flex-wrap:wrap;gap:6px}
.hk-choices button{flex:1 1 auto;min-width:56px;padding:6px 10px}
.hk-counts{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr))}
.hk-counts button{min-width:0}
.hk-range{display:grid;grid-template-columns:1fr 40px;gap:10px;align-items:center}
.hk-range output{font-weight:700;text-align:right;font-size:14px}
.hk-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hk .hk-check{display:flex;align-items:center;gap:8px;font-size:14px;margin:0;cursor:pointer}
.hk-check input{width:20px;height:20px;margin:0;accent-color:var(--brand)}
.hk-sw{display:inline-block;width:18px;height:18px;border-radius:4px;border:3px solid;box-sizing:border-box;flex:none}
.hk .hk-bulk{position:relative;display:flex;align-items:center;justify-content:center;min-height:56px;margin:0;border:2px dashed #b9a6c8;border-radius:10px;background:#fff;color:#493555;font-size:15px;cursor:pointer}
.hk-bulk:hover{background:var(--brand-soft)}
.hk-bulk input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}
.hk-count{font-size:13px;color:var(--muted);margin:10px 0 0}
.hk-slots{list-style:none;margin:10px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.hk-slot{border:1px solid var(--line-2);border-radius:8px;background:#fff;padding:5px}
.hk .hk-slot-pick{position:relative;display:block;aspect-ratio:1/1;max-width:100%;margin:0;border-radius:6px;overflow:hidden;background:#f3eff6;cursor:pointer}
.hk-slot-pick input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer;z-index:1}
.hk-slot-pick img{display:block;width:100%;height:100%;object-fit:cover}
.hk-slot-empty{display:flex;align-items:center;justify-content:center;height:100%;font-size:28px;font-weight:400;color:#9a88a8}
.hk-slot-num{position:absolute;left:4px;top:4px;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:10px;background:#000000a0;color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;pointer-events:none}
.hk-slot-tools{display:flex;gap:4px;margin-top:5px}
.hk button.hk-tool{flex:1;min-width:0;min-height:34px;padding:0;font-size:14px}
.hk-one{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.hk-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.hk-actions > *{flex:1 1 140px}
.hk-hint{font-size:13px;line-height:1.8;margin:14px 0 0;padding:10px 12px;background:var(--brand-soft);border-radius:8px}
.hk-msg{font-size:13px;min-height:1.8em;margin:8px 0 0}
.hk-fallback img{display:block;width:100%;max-width:460px;margin:8px auto 0;border:1px solid var(--line-2);border-radius:8px}
.hk-sub{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.hk-article{max-width:760px;margin:40px auto 0;line-height:1.9}
.hk-article h2{font-size:21px;margin:34px 0 12px}
.hk-article table{border-collapse:collapse;width:100%;font-size:14px}
.hk-article th,.hk-article td{border:1px solid var(--line-2);padding:8px 10px;text-align:left;vertical-align:top}
.hk-article th{background:var(--bg);white-space:nowrap}
.hk-article details{border-bottom:1px solid var(--line-2);padding:14px 0}
.hk-article summary{font-weight:700;cursor:pointer}
.hk-article a{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
@media (max-width:820px){
.hk-layout{grid-template-columns:minmax(0,1fr);gap:20px}
.hk-preview{position:static;order:-1}
.hk fieldset{padding:14px 12px}
.hk-two{grid-template-columns:1fr}
}
