/* 首页可视化编辑（2026-11-12）：只在 html.hve-on 时生效，不影响平时的首页 */
html.hve-on body { padding-bottom: 84px; }
html.hve-on [data-hve-text] { outline: 2px dashed #ffb020; outline-offset: 3px; border-radius: 4px; cursor: text; min-width: 1em; }
html.hve-on [data-hve-text]:hover { outline-color: #ff8a00; outline-style: solid; }
html.hve-on [data-hve-text]:focus { outline: 2px solid #4c3fd3; background: rgba(255, 255, 255, .85); color: #1d1b29; }
html.hve-on .game-card { cursor: pointer !important; }
html.hve-on .game-card:hover { outline: 2px dashed #4c3fd3; outline-offset: 2px; }
html.hve-on .game-card.hve-picked { outline: 3px solid #4c3fd3; outline-offset: 2px; }
html.hve-on .game-card.hve-edited { box-shadow: 0 0 0 3px rgba(111, 99, 255, .55) !important; }
html.hve-on .group-title { cursor: pointer; }
html.hve-on .group-title:hover { outline: 1.5px dashed #4c3fd3; outline-offset: 3px; border-radius: 6px; }
html.hve-on .gc-link::after { pointer-events: none; }

#hve-bar { position: fixed; z-index: 2147483000; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 7px 8px 7px 14px; border-radius: 16px; background: #1f1b45; color: #e9e6ff; box-shadow: 0 18px 50px -14px rgba(22, 19, 40, .7); font: 14px/1.2 "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; max-width: calc(100vw - 24px); }
#hve-bar .hve-brand { margin-right: 6px; white-space: nowrap; }
#hve-bar button { height: 36px; min-width: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
#hve-bar button:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
#hve-bar button:disabled { opacity: .35; cursor: default; }
#hve-bar .hve-primary { background: #6f63ff; padding: 0 16px; }
#hve-bar .hve-primary:hover:not(:disabled) { background: #8075ff; }
#hve-bar .hve-ghost { background: transparent; color: rgba(233, 230, 255, .75); }
#hve-bar .hve-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .15); margin: 0 4px; }
#hve-bar .hve-count { margin: 0 8px; font-size: 12.5px; color: rgba(233, 230, 255, .6); white-space: nowrap; }
#hve-bar.dirty .hve-count { color: #ffd479; }

#hve-pop { position: fixed; z-index: 2147483001; width: 340px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; background: #fff; color: #1d1b29; border-radius: 14px; box-shadow: 0 24px 60px -16px rgba(22, 19, 40, .55); border: 1px solid #e7e3dc; font: 13.5px/1.45 "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; }
#hve-pop.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 78vh; border-radius: 18px 18px 0 0; }
#hve-pop * { box-sizing: border-box; }
.hve-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid #f0ede8; }
.hve-pop-head b { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hve-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f4f2ee; cursor: pointer; color: #45414f; font-size: 14px; }
.hve-pop-body { overflow-y: auto; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.hve-key { font: 12px ui-monospace, Consolas, monospace; color: #827d8b; margin-top: -4px; }
.hve-field { display: flex; flex-direction: column; gap: 4px; }
.hve-label { font-weight: 700; font-size: 12.5px; color: #45414f; }
.hve-hint { color: #827d8b; font-size: 11.5px; }
.hve-input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid #e7e3dc; border-radius: 9px; background: #fff; color: #1d1b29; font: inherit; }
textarea.hve-input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.hve-input:focus { outline: 2px solid rgba(76, 63, 211, .35); border-color: #4c3fd3; }
.hve-input.hve-emoji { width: 90px; font-size: 18px; text-align: center; }
.hve-sub { font-weight: 800; font-size: 12px; letter-spacing: 1px; color: #4c3fd3; margin-top: 4px; }
.hve-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hve-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hve-row .hve-input { flex: 1 1 120px; width: auto; }
.hve-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.hve-check input { width: 18px; height: 18px; accent-color: #4c3fd3; }
.hve-btn { height: 34px; padding: 0 14px; border: 1px solid #e7e3dc; border-radius: 9px; background: #fff; color: #1d1b29; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.hve-btn:hover { border-color: #4c3fd3; color: #4c3fd3; }
.hve-btn.primary { background: #4c3fd3; border-color: #4c3fd3; color: #fff; }
.hve-btn.primary:hover { background: #5b4fe0; color: #fff; }
.hve-btn.text { border-color: transparent; background: transparent; padding: 0 6px; color: #4c3fd3; }
.hve-btn.text.danger { color: #c4432f; }
.hve-pop-foot { justify-content: flex-end; border-top: 1px solid #f0ede8; padding-top: 10px; margin-top: 2px; }
.hve-pop-foot .hve-btn.text.danger { margin-right: auto; }
.hve-p { margin: 0; color: #45414f; line-height: 1.6; }

#hve-toast { position: fixed; z-index: 2147483002; left: 50%; top: 18px; transform: translate(-50%, -8px); padding: 10px 16px; border-radius: 12px; background: #1f1b45; color: #fff; font: 600 13.5px/1.4 "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
#hve-toast.show { opacity: 1; transform: translate(-50%, 0); }
#hve-toast.ok { background: #176b45; }
#hve-toast.err { background: #a33524; }

@media (max-width: 640px) {
  html.hve-on body { padding-bottom: 76px; }
  #hve-bar { left: 8px; right: 8px; bottom: 8px; transform: none; padding: 6px; gap: 3px; }
  #hve-bar .hve-brand, #hve-bar .hve-sep, #hve-bar [data-a="help"] { display: none; }
  #hve-bar button span { display: none; }
  #hve-bar .hve-count { flex: 1; min-width: 0; margin: 0 4px; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
  #hve-bar button { padding: 0 8px; }
  #hve-bar .hve-primary { padding: 0 12px; }
}
