/* Right-hand combat layout. Geometry is in logical landscape CSS pixels. */
#honorGamepad {
  --hg-unit:1px; --hg-move-size:236px;
  grid-template-rows:44px 1fr 25px;
  background:#07131c;
  padding-left:max(10px,env(safe-area-inset-left));
  padding-right:max(10px,env(safe-area-inset-right));
}
.hg-toolbar{gap:14px;border-bottom:1px solid #88b9bf18;}
.hg-brand>span{width:28px;height:28px;border-radius:9px;font-size:16px;background:#a9894c0d;}
.hg-brand strong{font-size:13px;letter-spacing:1px;}
.hg-brand strong em{font-style:normal;font-size:9px;letter-spacing:0;color:#9bbaa8;border-left:1px solid #70968b45;padding-left:8px;margin-left:6px;}
.hg-brand small{font-size:8px;letter-spacing:.4px;margin-top:1px;}
.hg-toolbar nav{gap:5px;}
.hg-toolbar button{min-width:40px;padding:6px 9px!important;border-radius:7px;background:#13232d;}
.hg-connection{font-size:9px;gap:5px;}
.hg-connection>span{max-width:240px;}
.hg-board{isolation:isolate;overflow:hidden;}
.hg-board::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 77% 65%,#24434d65,transparent 62%),radial-gradient(ellipse at 20% 60%,#1b493c40,transparent 62%),linear-gradient(130deg,#0d2029,#101e28);pointer-events:none;z-index:-2;}
.hg-move-surface{position:absolute;inset:0;pointer-events:none;z-index:-1;}
.hg-zone-label{position:absolute;left:3.5%;top:8%;display:flex;flex-direction:column;gap:5px;pointer-events:none;}
.hg-zone-label strong{font-size:16px;letter-spacing:3px;font-weight:500;color:#94b7ad;}
.hg-zone-label span{font-size:10px;letter-spacing:1px;color:#597e7f;}
.hg-move-lines{position:absolute;inset:0;background:radial-gradient(ellipse at 35% 67%,#2d897122,transparent 70%);opacity:.5;transition:opacity .12s;}
.is-moving .hg-move-lines{opacity:1;}
.hg-combat-orbit{position:absolute;border:1px solid #c4aa6f12;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:-1;}
#honorGamepad .hg-control{
  --accent:151,186,198; gap:3px;z-index:1;
  width:calc(46 * var(--hg-unit));height:calc(46 * var(--hg-unit));
  min-width:40px;min-height:40px;
  border:1px solid rgba(var(--accent),.37);
  background:radial-gradient(circle at 35% 24%,rgba(var(--accent),.13),transparent 75%),#152936;
  box-shadow:inset 0 0 0 4px #05121a88,inset 0 0 0 5px rgba(var(--accent),.09),0 5px 12px #0004;
  transition:background-color .09s,border-color .09s,box-shadow .09s;
  padding:6px;color:rgba(var(--accent),.96);
}
#honorGamepad .hg-control::after{content:"";position:absolute;inset:8px;border:1px solid rgba(var(--accent),.07);border-radius:inherit;pointer-events:none;}
.hg-control b:empty{display:none;}
.hg-control b{font-size:10px;line-height:1;color:rgba(var(--accent),.75);}
.hg-name{font-size:11px;line-height:1.2;letter-spacing:1px;color:#cedde3;}
.hg-glyph{width:20px;height:20px;display:block;pointer-events:none;}
.hg-glyph:empty{display:none;}
.hg-glyph svg{display:block;width:100%;height:100%;}
#honorGamepad .hg-stick[data-hg=move]{--accent:103,205,180;width:var(--hg-move-size);height:var(--hg-move-size);border:1px solid #679e8c44;background:repeating-radial-gradient(circle,transparent 0,transparent 24%,#7cbfab0a 25%,transparent 26%),radial-gradient(circle,#1c423c50,#0e23292b 67%);box-shadow:inset 0 0 0 12px #a0dfc305,inset 0 0 0 13px #a0dfc30c,0 0 38px #44877d08;}
#honorGamepad [data-hg=move]{z-index:0;}
#honorGamepad [data-hg=move]::after{inset:23%;border:1px dashed #99d9c124;}
.hg-stick[data-hg=move] .hg-knob{width:42%;height:42%;background:radial-gradient(circle at 35% 25%,#3e6c62,#203e3e 75%);border:1px solid #a6daca7a;box-shadow:inset 0 0 0 6px #bcffe908,0 6px 24px #0006;}
.hg-stick[data-hg=move] b{font-size:10px;color:#b5e5d6;font-weight:500;letter-spacing:3px;}
.hg-stick[data-hg=move] .hg-name{bottom:17px;color:#678e85;font-size:10px;}
#honorGamepad [data-hg=camera]{width:calc(78 * var(--hg-unit));height:calc(78 * var(--hg-unit));min-width:55px;min-height:55px;--accent:123,155,177;background:#122530;border-style:dashed;box-shadow:none;}
[data-hg=camera] .hg-knob{display:none;}
[data-hg=camera] .hg-name{position:static!important;font-size:10px!important;}
[data-hg=camera] b{display:none;}
#honorGamepad .hg-skill{width:calc(88 * var(--hg-unit));height:calc(88 * var(--hg-unit));min-width:64px;min-height:64px;border-width:1.5px;}
#honorGamepad [data-hg=skill1]{--accent:120,203,199;}
#honorGamepad [data-hg=skill2]{--accent:135,181,226;}
#honorGamepad [data-hg=skill3]{--accent:193,170,229;}
.hg-skill .hg-glyph{width:calc(23 * var(--hg-unit));height:calc(23 * var(--hg-unit));position:absolute;top:17%;left:50%;transform:translateX(-50%);opacity:.87;}
.hg-skill b{position:absolute;left:18%;top:20%;font:500 13px/1 system-ui,sans-serif;opacity:.6;}
.hg-skill .hg-name{font-size:11px;letter-spacing:1px;margin-top:26%;}
.hg-cast-label{font-size:7px;letter-spacing:.5px;color:rgba(var(--accent),.48);line-height:1.3;}
#honorGamepad .hg-attack{--accent:233,200,134;width:calc(144 * var(--hg-unit));height:calc(144 * var(--hg-unit));min-width:95px;min-height:95px;border:2px solid #d3b7789c;background:radial-gradient(circle at 38% 22%,#75664655,#3b3c3055 52%,#23302c);box-shadow:inset 0 0 0 6px #d9bc750b,inset 0 0 0 7px #d9bc7521,0 7px 22px #0005;}
.hg-attack .hg-glyph{width:32px;height:32px;margin-bottom:3px;}
.hg-attack .hg-name{font-size:20px;font-weight:500;letter-spacing:4px;color:#f7e7c3;}
.hg-attack b{font-size:9px;position:absolute;top:13%;right:22%;}
#honorGamepad .hg-utility{--accent:145,179,180;width:calc(54 * var(--hg-unit));height:calc(54 * var(--hg-unit));min-width:42px;min-height:42px;border-radius:15px;background:#132830;box-shadow:inset 0 1px 0 #b0d9d10a,0 3px 7px #0002;}
.hg-utility .hg-glyph{width:17px;height:17px;}
.hg-utility .hg-name{font-size:9px;letter-spacing:0;}
#honorGamepad [data-hg=heal]{--accent:144,198,153;}
#honorGamepad [data-hg=summoner]{--accent:226,189,121;}
#honorGamepad .hg-purchase{--accent:223,197,143;width:calc(100 * var(--hg-unit));height:calc(48 * var(--hg-unit));min-width:88px;min-height:42px;border-radius:14px;flex-direction:row;gap:7px;background:#303127;box-shadow:inset 0 1px 0 #f3dda315,0 3px 10px #0003;}
.hg-purchase .hg-name{font-size:11px;letter-spacing:0;color:#ead9ac;}
.hg-purchase .hg-glyph{width:20px;height:20px;flex:none;}
.hg-purchase b{display:none;}
#honorGamepad .hg-cancel{--accent:185,125,137;width:calc(64 * var(--hg-unit));height:calc(48 * var(--hg-unit));min-width:56px;min-height:38px;border-radius:14px;border:1px dashed #9d6c7866;background:#30242c80;box-shadow:none;flex-direction:row;gap:5px;padding:5px;}
.hg-cancel .hg-glyph{width:16px;height:16px;}
.hg-cancel b{display:none;}
.hg-cancel .hg-name{font-size:10px;letter-spacing:0;color:#ba97a1;}
.is-casting .hg-cancel{border-color:#c58c99!important;background:#422c37!important;box-shadow:0 0 0 4px #b8798910!important;}
#honorGamepad .is-pressed{border-color:rgba(var(--accent),.96);background-color:rgba(var(--accent),.18);box-shadow:inset 0 0 0 4px rgba(var(--accent),.07),0 0 0 3px rgba(var(--accent),.12),0 0 28px rgba(var(--accent),.16);filter:none;}
.hg-skill.is-aiming .hg-glyph,.hg-skill.is-aiming .hg-name,.hg-skill.is-aiming b,.hg-skill.is-aiming .hg-cast-label{opacity:.2;}
.hg-aim-dot{width:25px;height:25px;background:rgba(var(--accent),.85);box-shadow:0 0 0 7px rgba(var(--accent),.10),0 0 20px rgba(var(--accent),.28);border:1px solid rgba(var(--accent),1);}
.hg-skill.is-aiming .hg-aim-dot{display:none;}
.hg-aim-wheel[hidden]{display:none;}
.hg-aim-wheel{position:absolute;z-index:4;pointer-events:none;transform:translate(-50%,-50%);border-radius:50%;border:1.5px solid rgba(var(--accent),.8);background:radial-gradient(circle,rgba(var(--accent),.02) 47%,rgba(var(--accent),.1) 49%,#08172266 51%,#08172222 97%,rgba(var(--accent),.2));box-shadow:0 0 0 4px rgba(var(--accent),.05),inset 0 0 24px rgba(var(--accent),.08);}
.hg-aim-inner{position:absolute;inset:25%;border:1px dashed rgba(var(--accent),.48);border-radius:50%;}
.hg-aim-axis{position:absolute;background:rgba(var(--accent),.13);}
.hg-aim-axis-x{left:8px;right:8px;top:50%;height:1px;}
.hg-aim-axis-y{top:8px;bottom:8px;left:50%;width:1px;}
.hg-aim-center{position:absolute;left:50%;top:50%;width:7px;height:7px;border:1px solid rgba(var(--accent),.8);border-radius:50%;transform:translate(-50%,-50%);}
.hg-aim-ray{position:absolute;left:50%;top:50%;height:2px;width:var(--aim-travel);transform-origin:0 50%;transform:translateY(-50%) rotate(var(--aim-angle));background:linear-gradient(90deg,rgba(var(--accent),.12),rgba(var(--accent),.95));opacity:0;}
.hg-aim-ray::after{content:"";position:absolute;right:0;top:50%;width:7px;height:7px;border-top:2px solid rgba(var(--accent),1);border-right:2px solid rgba(var(--accent),1);transform:translateY(-50%) rotate(45deg);}
.hg-aim-cursor{position:absolute;left:50%;top:50%;width:18px;height:18px;border-radius:50%;border:1.5px solid rgba(var(--accent),1);background:rgba(var(--accent),.8);box-shadow:0 0 0 5px rgba(var(--accent),.12);transform:translate(calc(-50% + var(--aim-x)),calc(-50% + var(--aim-y)));}
.hg-aim-wheel.has-direction .hg-aim-ray{opacity:1;}
.hg-aim-wheel.at-limit{border-color:rgba(var(--accent),1);box-shadow:0 0 0 4px rgba(var(--accent),.14);}
.hg-aim-wheel.is-cancelled{--accent:245,139,163!important;}
.hg-aim-wheel.is-cancelled .hg-aim-ray{opacity:0;}
#honorGamepad.is-cancelling .hg-cancel{background:#923f51!important;color:#fff;border-color:#f7b7c7!important;box-shadow:0 0 24px #b8446245!important;}
#honorGamepad.is-cancelling .hg-cancel .hg-name{color:#ffe9ef;}
.is-cancelling .hg-skill.is-aiming{--accent:245,139,163!important;}
.hg-upgrades{position:absolute;inset:0;display:block;pointer-events:none;z-index:2;}
.hg-upgrades .hg-upgrade-target{position:absolute;transform:translate(-50%,-50%);pointer-events:none;width:clamp(30px,calc(34 * var(--hg-unit)),40px);height:clamp(30px,calc(34 * var(--hg-unit)),40px);padding:0;border-radius:50%;font-size:19px!important;font-weight:400;background:#29382e;border:1px solid #b3b88065;color:#e2ddb6!important;box-shadow:0 2px 8px #0004;touch-action:none;}
.hg-upgrades .hg-upgrade-target.is-pressed{background:#4a5940;border-color:#e0d59c;}
.hg-upgrades .hg-upgrade-target{box-shadow:0 0 0 4px #11232c,0 3px 10px #0005;}
.hg-footer{font-size:9px;letter-spacing:.4px;color:#729098;border-top-color:#88b9bf18;}
.hg-footer button{font-size:9px!important;color:#8caaa9;padding:3px 8px;}
.hg-editing .hg-move-surface{background:#54b49408;}
.hg-editing .hg-control{outline:1px dashed #e5d89e88;outline-offset:4px;}
.hg-preferences{display:flex;gap:20px;flex-wrap:wrap;}
.hg-preferences input{accent-color:#b8ceae;margin-right:6px;}
.hg-preferences small{font-size:10px;}
#honorGamepad[data-backend=xinput] .hg-utility b{display:none;}
@media (orientation:portrait){
  #honorGamepad{grid-template-rows:44px 1fr 25px;padding:0 10px;}
}
@media (max-height:380px) and (orientation:landscape),(max-width:380px) and (orientation:portrait){
  .hg-zone-label{top:5%;}.hg-zone-label strong{font-size:17px;}
  .hg-toolbar{gap:9px;}.hg-brand strong em{font-size:8px;padding-left:5px;margin-left:3px;}
  .hg-connection>span{max-width:150px;}
  .hg-skill .hg-name{font-size:11px;}.hg-cast-label{font-size:7px;}
  .hg-attack .hg-glyph{width:26px;height:26px;}.hg-attack .hg-name{font-size:17px;}
}
@media (prefers-reduced-motion:reduce){#honorGamepad *{transition:none!important;}}
#hgData.is-collecting::before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#75d8b6;margin-right:4px;vertical-align:middle;}
#honorGamepad:has(dialog[open]){touch-action:pan-y;}
#hgDataDialog{width:calc(100% - 28px);max-width:920px;max-height:90dvh;overflow:auto;border:1px solid #6f949577;border-radius:18px;background:#10232c;color:#e2ecec;padding:20px;touch-action:pan-y;user-select:text;}
#hgDataDialog::backdrop{background:#020a10dd;}
#hgDataDialog header{display:flex;align-items:center;justify-content:space-between;gap:20px;}
#hgDataDialog h2{margin:3px 0 12px;font-size:22px;}
#hgDataDialog small,#hgDataDialog p{font-size:11px;line-height:1.6;color:#9bb6bd;}
#hgDataDialog button{border:1px solid #8da99e50;border-radius:8px;background:#243d43;padding:8px 12px;font-size:12px;}
#hgDataDialog button:disabled{opacity:.45;}
#hgDataDialog label{display:block;font-size:12px;margin:12px 0;}
#hgDataDialog select{display:block;width:100%;background:#1b333e;border:1px solid #76909566;color:#e3eeee;padding:8px;border-radius:7px;margin-top:6px;}
#hgCollectionState{color:#81d3b8;margin-left:10px;font-size:11px;}
.hg-data-actions{display:flex;gap:8px;flex-wrap:wrap;}
.hg-data-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0;}
.hg-data-summary>div{padding:12px;background:#1b333c;border:1px solid #76b39b22;border-radius:10px;}
.hg-data-summary strong{font-size:25px;display:block;color:#c9e8dd;}
.hg-data-summary span{font-size:11px;color:#89aaa9;}
.hg-data-heat{background:#081821;border-radius:10px;overflow:hidden;}
.hg-data-heat svg{display:block;width:100%;max-height:52dvh;}
.hg-data-advice{border-left:2px solid #82c3ad;padding-left:12px;}
.hg-data-table{overflow:auto;margin-top:14px;}
.hg-data-table table{width:100%;border-collapse:collapse;font-size:11px;white-space:nowrap;}
.hg-data-table th,.hg-data-table td{text-align:left;padding:9px 10px;border-bottom:1px solid #8babba22;}
.hg-data-table th{color:#9cb8bc;font-weight:500;}
/* A single full-height play surface. Tools live in the upper-left menu. */
#honorGamepad{grid-template-rows:1fr;overflow:hidden;}
#honorGamepad .hg-toolbar{position:absolute;left:max(12px,env(safe-area-inset-left));top:max(10px,env(safe-area-inset-top));z-index:6;gap:8px;border:0;}
#honorGamepad .hg-toolbar button{background:#172f3bf5;border-color:#9fc2bc66;min-width:60px;min-height:46px;padding:10px 14px!important;font-size:13px!important;border-radius:12px;touch-action:manipulation;}
#honorGamepad .hg-toolbar button:active{background:#304b55;border-color:#b7d1ba;}
#honorGamepad .hg-toolbar #hgEditDone{background:#b9caae;color:#172b27;}
#honorGamepad.hg-editing .hg-toolbar>#hgScreenOpen,#honorGamepad.hg-editing .hg-toolbar>#hgSettings,#honorGamepad.hg-editing .hg-toolbar>#hgFullscreen{display:none;}
#honorGamepad [hidden]{display:none!important;}
.hg-status-dot{display:inline-block;width:5px;height:5px;margin-left:6px;border-radius:50%;background:#c8ab73;vertical-align:middle;}
.hg-status-dot[data-state=ready]{background:#75d8b6;}.hg-status-dot[data-state=error]{background:#f49391;}
#honorGamepad .hg-control b,#honorGamepad .hg-cast-label{display:none;}
#honorGamepad .hg-skill .hg-name{margin-top:24%;}
#honorGamepad .hg-equipment{--accent:213,187,135;width:calc(48 * var(--hg-unit));height:calc(48 * var(--hg-unit));min-width:44px;min-height:44px;border-radius:14px;}
.hg-equipment .hg-name{font-size:8px;letter-spacing:0;}.hg-equipment .hg-glyph{width:17px;height:17px;}
#honorGamepad .hg-cancel{visibility:hidden;pointer-events:none;width:calc(68 * var(--hg-unit));height:calc(68 * var(--hg-unit));min-width:58px;min-height:58px;border-radius:50%;z-index:5;flex-direction:column;}
.hg-cancel .hg-glyph{width:26px;height:26px;}
#honorGamepad.is-aim-dragging .hg-cancel,#honorGamepad.hg-editing .hg-cancel{visibility:visible;pointer-events:auto;}
#honorGamepad.is-aim-dragging .hg-purchase{visibility:hidden;pointer-events:none;}
#hgMenuDialog{width:min(380px,calc(100% - 30px));max-height:90dvh;overflow:auto;touch-action:pan-y;border:1px solid #68869477;border-radius:18px;background:#12242d;color:#e1ebef;padding:20px;}
#hgMenuDialog::backdrop{background:#02080bd9;}
#hgMenuDialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
#hgMenuDialog h2{font-size:20px;margin:0;}
#hgMenuDialog button{background:#243b44;border:1px solid #8daaa344;border-radius:12px;padding:12px 14px;font-size:14px;min-height:48px;touch-action:manipulation;}
#hgMenuDialog nav{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
#hgMenuDialog details{margin-top:18px;font-size:11px;color:#8da9b3;}
#hgMenuDialog .hg-connection{margin-top:10px;flex-wrap:wrap;}
#hgMenuDialog .hg-connection>span{max-width:none;white-space:normal;}
#honorGamepad [data-hg=camera].is-pressed .hg-knob{display:block;width:18px;height:18px;background:#b0d3e7;pointer-events:none;}

/* Game-coordinate layout: circles stay on their calibrated centers. */
#honorGamepad .hg-purchase{width:calc(54 * var(--hg-unit));height:calc(54 * var(--hg-unit));min-width:48px;min-height:48px;flex-direction:column;gap:2px;}
#honorGamepad.hg-native .hg-combat-orbit{display:none;}
#honorGamepad.hg-native .hg-control,#honorGamepad.hg-native .hg-upgrades .hg-upgrade-target{
  width:var(--native-diameter);height:var(--native-diameter);min-width:0;min-height:0;
  border-radius:50%;
}
#honorGamepad.hg-native .hg-control{gap:2px;flex-direction:column;}
#honorGamepad.hg-native .hg-control .hg-name{font-size:10px;}
#honorGamepad.hg-native .hg-control .hg-glyph{width:16px;height:16px;}
#honorGamepad.hg-native .hg-attack .hg-name{font-size:16px;}
#honorGamepad.hg-native .hg-attack .hg-glyph{width:24px;height:24px;}
#honorGamepad.hg-native .hg-small .hg-name,#honorGamepad.hg-native .hg-equipment .hg-name{font-size:9px;}
#honorGamepad.hg-native [data-hg=shop] .hg-glyph{display:none;}
#honorGamepad.hg-native .hg-upgrades .hg-upgrade-target{font-size:17px!important;}
#honorGamepad.hg-native .hg-control::after{inset:4px;}

/* Keep our larger combat controls while widening only the space between hands. */
#honorGamepad.hg-comfort .hg-control .hg-name{font-size:11px;}
#honorGamepad.hg-comfort .hg-skill .hg-name{font-size:12px;}
#honorGamepad.hg-comfort .hg-control .hg-glyph{width:20px;height:20px;}
#honorGamepad.hg-comfort .hg-attack .hg-name{font-size:18px;}
#honorGamepad.hg-comfort .hg-attack .hg-glyph{width:29px;height:29px;}
#honorGamepad.hg-comfort .hg-purchase{border-radius:16px;}
#honorGamepad.hg-comfort .hg-equipment .hg-name{font-size:9px;letter-spacing:0;}
#honorGamepad.is-attack-repeating .hg-attack{border-color:#f1d69e;box-shadow:inset 0 0 0 4px #05121a88,0 0 20px #c4ab5c38;}

/* The central touch surface shares the controller background without a popup. */
#hgScreenView{position:absolute;z-index:12;display:flex;box-sizing:border-box;color:#e1ebeb;font:13px/1.4 system-ui,sans-serif;touch-action:none;user-select:none;-webkit-user-select:none;}
#hgScreenView[hidden]{display:none!important;}
#hgSharedTrackpadHost{display:flex;flex:1;min-height:0;min-width:0;}
body.restored-workspace #hgSharedTrackpadHost>#landscapeTrackpad{position:relative;inset:auto;display:block!important;flex:1;min-height:0;min-width:0;width:100%;height:100%;margin:0;transform:none;border:1px dashed #73979455;background:#507b6908;border-radius:14px;box-shadow:none;touch-action:none;}
#hgScreenView #landscapeTrackpad .landscape-trackpad-mode{color:#bbd3c9;font-size:12px;}
#hgScreenView #landscapeTrackpad .trackpad-instructions{display:none;}
#hgScreenView #landscapeTrackpad::after{content:"滑动移动\A轻点选择 · 长按拖动";white-space:pre;text-align:center;line-height:2.1;position:absolute;inset:0;display:grid;place-content:center;color:#9dbab0;font-size:11px;pointer-events:none;}
#hgScreenView #landscapeTrackpad:is(.active,.gesture-feedback-active)::after{opacity:0;}

#hgRiskDialog{width:min(470px,calc(100% - 28px));max-height:88dvh;overflow:auto;touch-action:pan-y;border:1px solid #bda77866;border-radius:16px;background:#142730;color:#dce7e8;padding:18px 22px;}
#hgRiskDialog::backdrop{background:#030b11df;}
#hgRiskDialog h2{font-size:19px;margin:0 0 10px;}
#hgRiskDialog p{font-size:12px;line-height:1.7;margin:9px 0;color:#b9c9ce;}
#hgRiskDialog strong{color:#eddbac;}
#hgRiskDialog a{color:#dcc893;}
#hgRiskDialog>div{display:flex;justify-content:flex-end;gap:10px;margin-top:14px;}
#hgRiskDialog button{padding:9px 13px;border:1px solid #a3bdb34d;border-radius:8px;background:#283f43;font-size:12px;}
#hgRiskDialog #hgRiskAccept{background:#b9caae;color:#172b27;}

/* While aiming, the attack center becomes the visible cancellation target. */
#honorGamepad [data-hg="cancel"]{width:var(--hg-cancel-size)!important;height:var(--hg-cancel-size)!important;min-width:0;min-height:0;padding:2px;gap:1px;z-index:5;}
#honorGamepad [data-hg="cancel"] .hg-glyph{width:16px;height:16px;}
#honorGamepad [data-hg="cancel"] .hg-name{font-size:10px;}
#honorGamepad.hg-editing [data-hg="cancel"]{visibility:hidden;pointer-events:none;}
#honorGamepad.is-aim-dragging .hg-attack :is(.hg-name,.hg-glyph,.hg-knob){opacity:0;}
#honorGamepad.is-aim-dragging .hg-attack{border-color:#a9798580;background:#2b2431;}
.hg-aim-feedback{position:absolute;left:50%;top:calc(50% + 26px);transform:translateX(-50%);font-size:11px;color:#e5c6cf;white-space:nowrap;padding:3px 6px;border-radius:6px;background:#07131cd9;}
.hg-aim-feedback:empty{display:none;}
#honorGamepad .hg-upgrades{display:none;z-index:3;}
#honorGamepad.hg-upgrading .hg-upgrades{display:block;}
#honorGamepad.hg-upgrading .hg-skill{opacity:.25;}
#honorGamepad .hg-upgrades .hg-upgrade-target{font-size:22px!important;font-weight:600;border:2px solid #ddd1a0;background:#46523b;box-shadow:inset 0 0 0 4px #182820,0 0 18px #b4b3772b;}

/* Native battle HUD: compact tools, illustrated abilities and quiet metal rims. */
#honorGamepad[data-backend] .hg-toolbar{gap:0;top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));padding:0 3px;background:#0c1b27e8;border:1px solid #7492a02e;border-radius:10px;}
#honorGamepad[data-backend] .hg-toolbar button{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;padding:6px 9px!important;border:0;border-radius:7px;background:transparent;font-size:10px!important;line-height:1;color:#a9bdc8;}
#honorGamepad[data-backend] .hg-toolbar button svg{width:17px;height:17px;flex:none;}
#honorGamepad[data-backend] .hg-toolbar button:active{background:#254052;color:#e2edf2;}
#honorGamepad[data-backend] .hg-status-dot{position:absolute;right:7px;top:8px;width:4px;height:4px;margin:0;}
#honorGamepad[data-backend] .hg-control{border:1px solid #5f8299;background:radial-gradient(circle at 40% 30%,#24435a,#102434 80%);box-shadow:inset 0 0 0 3px #081824,inset 0 0 0 4px #4e738450,0 3px 8px #0003;}
#honorGamepad[data-backend] .hg-control::after{inset:5px;border-color:#9dc6da17;}
#honorGamepad[data-backend] .hg-control .hg-name{font-size:9px;letter-spacing:0;font-weight:400;color:#b5c8d2;text-shadow:0 1px 3px #000;}
#honorGamepad[data-backend] .hg-control .hg-glyph{width:22px;height:22px;color:#8dbbd5;}
#honorGamepad[data-backend] .hg-skill{border-color:#8399a9;background:radial-gradient(circle at 40% 30%,#725336,#342526 78%);}
#honorGamepad[data-backend] [data-hg=skill2]{background:radial-gradient(circle at 38% 30%,#346786,#15293e 80%);}
#honorGamepad[data-backend] [data-hg=skill3]{background:radial-gradient(circle at 40% 28%,#82613a,#352b22 78%);border-color:#bba577;}
#honorGamepad[data-backend] .hg-skill .hg-glyph{position:absolute;left:50%;top:12%;transform:translateX(-50%);width:59%;height:59%;opacity:1;filter:drop-shadow(0 1px 4px #0a0f19);}
#honorGamepad[data-backend] .hg-skill .hg-name{position:absolute;bottom:11%;margin:0;font-size:9px;line-height:1.2;color:#e4ebee;}
#honorGamepad[data-backend] .hg-attack{border-color:#7ca2bc;background:radial-gradient(circle at 32% 25%,#284860,#0c2033 78%);box-shadow:inset 0 0 0 4px #0a1926,inset 0 0 0 5px #547b9170,0 4px 12px #0004;}
#honorGamepad[data-backend] .hg-attack .hg-glyph{width:42%;height:42%;margin:0;color:#9dcbe8;}
#honorGamepad[data-backend] .hg-attack .hg-name{font-size:11px;letter-spacing:1px;color:#c2d9e6;}
#honorGamepad[data-backend] [data-hg=move]{border-color:#5f93ae50;background:radial-gradient(circle,#294b6240,#10253328 68%);box-shadow:inset 0 0 0 6px #78b4d307,inset 0 0 0 7px #78b4d322;}
#honorGamepad[data-backend] [data-hg=move]::after{inset:23%;border-style:solid;border-color:#88b8cf25;}
#honorGamepad[data-backend] [data-hg=move] .hg-knob{background:radial-gradient(circle at 35% 24%,#456c81,#18374b 80%);border-color:#9dc6d877;box-shadow:inset 0 0 0 4px #77b1cc0b,0 3px 12px #0003;}
#honorGamepad[data-backend] [data-hg=camera]{border:1px dashed #7496ac44;background:#18334622;box-shadow:none;}
#honorGamepad[data-backend] [data-hg=camera] .hg-glyph{width:18px;height:18px;}
#honorGamepad[data-backend] .hg-purchase{border-color:#a78c5d;background:radial-gradient(circle at 35% 25%,#4d4430,#222b2e);border-radius:50%;}
#honorGamepad[data-backend] .hg-purchase .hg-name{font-size:8px;color:#d5c49e;}
#honorGamepad[data-backend] .hg-purchase .hg-glyph{width:16px;height:16px;}
#honorGamepad[data-backend] [data-hg=shop] .hg-glyph{display:block;width:17px;height:17px;color:#d5bc81;}
#honorGamepad[data-backend] [data-hg=shop] .hg-name{font-size:8px;color:#d5c49e;}
#honorGamepad[data-backend] .is-pressed{border-color:#bcdef3;filter:brightness(1.16);}
#honorGamepad[data-backend].is-aim-dragging .hg-attack{border-color:#a9798580;background:#2b2431;}

#hgSettingsDialog,#hgMenuDialog{width:min(520px,calc(100% - 24px));max-height:calc(var(--hg-panel-height,100dvh) - 20px);padding:12px 16px;border:1px solid #59758a66;border-radius:12px;background:#101f2b;font-size:12px;overflow:auto;}
#hgMenuDialog{width:min(300px,calc(100% - 24px));}
#hgSettingsDialog header,#hgMenuDialog header{position:sticky;top:-12px;z-index:2;margin:0 0 8px;padding:0 0 8px;background:#101f2b;border-bottom:1px solid #718b9c22;}
#hgSettingsDialog h2,#hgMenuDialog h2{font-size:14px;font-weight:500;margin:0;}
#hgSettingsDialog button,#hgMenuDialog button{min-height:36px;padding:6px 10px;border:1px solid #6e879a44;border-radius:6px;background:#1b3140;font-size:11px!important;line-height:1.3;}
#hgSettingsDialog header button,#hgMenuDialog header button{min-height:36px;min-width:44px;}
#hgSettingsDialog label{margin:5px 0;font-size:11px!important;line-height:1.4;}
#hgSettingsDialog select{width:100%;min-height:34px;margin-top:4px;padding:5px 8px;border:1px solid #6e879a44;border-radius:6px;background:#182e3d;color:#d8e4eb;font-size:11px;}
#hgSettingsDialog input[type=range]{height:26px;min-height:26px;margin:2px 0 0;accent-color:#9ab4c6;}
#hgSettingsDialog input[type=checkbox]{width:15px;height:15px;vertical-align:middle;accent-color:#9ab4c6;}
#hgSettingsDialog output{font-size:10px;color:#9fbdcf;}
#hgSettingsDialog .hg-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px;align-items:center;}
#hgSettingsDialog .hg-setting-wide{grid-column:1/-1;}
#hgSettingsDialog .hg-setting-check{display:flex;align-items:center;gap:5px;min-height:36px;}
#hgSettingsDialog .hg-layout-actions{display:flex;gap:8px;margin:6px 0 10px;}
#hgSettingsDialog details,#hgMenuDialog details{border-top:1px solid #6e879a2d;border-bottom:0;padding:8px 0;margin:0;font-size:11px;}
#hgSettingsDialog summary,#hgMenuDialog summary{font-size:11px;color:#aec3d1;cursor:pointer;min-height:26px;line-height:26px;}
#hgSettingsDialog p,#hgSettingsDialog small{font-size:10px;line-height:1.6;color:#8099aa;}
#hgSettingsDialog .hg-settings-footer{display:flex;align-items:center;gap:8px;border-top:1px solid #6e879a2d;padding-top:8px;margin-top:4px;}
#hgSettingsDialog .hg-save-note{font-size:10px;color:#7899a6;margin-right:auto;}
#hgSettingsDialog .hg-settings-footer button{background:transparent;border:0;padding:4px;font-size:10px!important;}
/* Attack-to-skill upgrades are one captured swipe; the targets never take input. */
#honorGamepad .hg-upgrade-target{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;box-sizing:border-box;pointer-events:none;color:#dfd3a9;}
#honorGamepad .hg-upgrade-target b{font-size:22px;font-weight:500;line-height:1.2;}
#honorGamepad .hg-upgrade-target small{font-size:9px;line-height:1.2;visibility:hidden;}
#honorGamepad .hg-upgrade-target.is-selected{background:#736234;border-color:#ffe9a7;box-shadow:inset 0 0 0 4px #433d29,0 0 0 3px #ead89955;}
#honorGamepad .hg-upgrade-target.is-selected small{visibility:visible;}
#honorGamepad.hg-upgrading .hg-attack{border-color:#b5a06b;}
#honorGamepad.hg-editing #hgScreenView{visibility:hidden;pointer-events:none;}
