/* Additive touch HUD. All existing layout overrides require this input mode. */
#seal-mobile-controls{--mobile-ink:#163d48;--mobile-gold:#efd5a0;--mobile-edge:#8f704d;position:fixed;inset:0;z-index:40;pointer-events:none;color:#fff5d6;font-family:Tahoma,Arial,sans-serif;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#seal-mobile-controls[hidden],#seal-mobile-controls [hidden]{display:none!important}
#seal-mobile-controls button{font-family:inherit;touch-action:none;-webkit-tap-highlight-color:transparent;pointer-events:auto;cursor:pointer;outline-offset:3px}
#seal-mobile-controls button:disabled{cursor:default;opacity:.5}
#seal-mobile-controls svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #102d3b)}
.mobile-toolbar,.mobile-joystick,.mobile-consumables,.mobile-action-pad,.mobile-target-hint,.mobile-menu-panel{display:none}
.mobile-mode{position:absolute;right:250px;top:max(10px,env(safe-area-inset-top));pointer-events:auto}
.mobile-tool{width:46px;min-height:46px;padding:5px 3px;border:1px solid #efd5a0a3;border-radius:12px;background:linear-gradient(155deg,#456570e8,#163942dc);box-shadow:inset 0 1px #fff4cf59,0 3px 9px #0e242748;color:#fff4d4;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px}
.mobile-tool span{font-size:9px;font-weight:bold;text-shadow:0 1px #142f3d}
.mobile-mode-options{position:absolute;top:55px;right:0;width:158px;padding:7px;background:linear-gradient(#254b55f5,#102e39f5);border:1px solid var(--mobile-gold);border-radius:12px;box-shadow:0 5px 22px #07191d66}
.mobile-mode-options button{display:block;width:100%;height:44px;border:0;border-radius:7px;background:transparent;color:#ffefd0;font-size:12px;text-align:left;padding:0 10px}
.mobile-mode-options button[aria-checked=true]{background:#f1d89b22;color:#fff8df;box-shadow:inset 3px 0 #eacb82}
.mobile-battery{display:none}
.seal-input-mobile .mobile-battery{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px;flex:none;margin-left:auto;color:#c6e9c8;font:bold 9px/12px Tahoma,sans-serif;pointer-events:none;white-space:nowrap}
.mobile-battery-cell{position:relative;display:block;width:21px;height:11px;padding:2px;border:1px solid currentColor;border-radius:3px}
.mobile-battery-cell::after{content:"";position:absolute;right:-3px;top:3px;width:2px;height:3px;border-radius:0 1px 1px 0;background:currentColor}
.mobile-battery-cell>b{display:block;height:100%;max-width:100%;border-radius:1px;background:currentColor;transition:width .3s}
.mobile-battery-cell svg{display:none;position:absolute;left:6px;top:-3px;width:9px;height:15px;fill:#fff7be;filter:drop-shadow(0 0 2px #254855)}
.mobile-battery.is-charging .mobile-battery-cell svg{display:block}.seal-input-mobile .mobile-battery.is-low{color:#ffd27d}.seal-input-mobile .mobile-battery.is-critical{color:#ff9c91}
.mobile-battery[data-state=unavailable]{color:#d4d6d0;opacity:.7}
.seal-input-mobile .mobile-toolbar{position:absolute;display:block;right:var(--hud-right);top:var(--menu-top);pointer-events:auto}
.seal-input-mobile .mobile-toolbar .mobile-tool{width:44px}
.seal-input-mobile .mobile-joystick{display:block;position:absolute;left:calc(max(12px,env(safe-area-inset-left)) + 2px);bottom:calc(max(16px,env(safe-area-inset-bottom)) + 12px + var(--control-lift));width:var(--stick-size);height:var(--stick-size);border-radius:50%;border:2px solid #f7dfac8a;background:radial-gradient(circle at 50% 44%,#a0d3c322,#36585d54 62%,#12353d91);box-shadow:inset 0 0 0 6px #152f3b33,inset 0 0 0 8px #f7dfac35,0 5px 20px #15313344;touch-action:none;pointer-events:auto;transition:box-shadow .15s}
.mobile-stick-ring{position:absolute;inset:24px;border:1px dashed #f3e8b55c;border-radius:50%;pointer-events:none}
.mobile-stick-cross{position:absolute;inset:14px;border-radius:50%;opacity:.35;background:linear-gradient(0deg,transparent calc(50% - .5px),#f0e6c9 calc(50% - .5px),#f0e6c9 calc(50% + .5px),transparent calc(50% + .5px)),linear-gradient(90deg,transparent calc(50% - .5px),#f0e6c9 calc(50% - .5px),#f0e6c9 calc(50% + .5px),transparent calc(50% + .5px));pointer-events:none}
.mobile-stick-thumb{position:absolute;width:56px;height:56px;left:calc(50% - 28px);top:calc(50% - 28px);transform:translate(var(--thumb-x,0px),var(--thumb-y,0px));border:2px solid #f5dc9f;border-radius:50%;background:linear-gradient(145deg,#7ba69eee,#2a5965f0 60%,#163e4cf0);box-shadow:inset 0 2px 3px #fff3b77a,inset 0 -3px 7px #142e3f8a,0 3px 9px #102c3f75;pointer-events:none;will-change:transform}
.mobile-stick-thumb img{width:36px;height:36px;position:absolute;inset:8px;opacity:.75;filter:sepia(.3) drop-shadow(0 1px 1px #17313d)}
.mobile-stick-caption{position:absolute;bottom:-16px;left:0;right:0;text-align:center;font-size:9px;font-weight:bold;letter-spacing:2px;color:#fff8d6;text-shadow:0 1px 3px #173b46;pointer-events:none}
.mobile-joystick.is-held{box-shadow:inset 0 0 0 6px #153b3f33,inset 0 0 0 8px #ffe7b07a,0 0 22px #a9f5e133}
.seal-input-mobile .mobile-action-pad{display:block;position:absolute;right:max(5px,env(safe-area-inset-right));bottom:calc(max(9px,env(safe-area-inset-bottom)) + var(--control-lift));width:var(--action-width);height:280px}
.mobile-skills{position:absolute;left:20px;right:10px;top:48px;display:grid;grid-template-columns:repeat(3,54px);gap:15px 10px;justify-content:end;pointer-events:none}
.mobile-skill{width:54px;height:54px;position:relative;padding:0;isolation:isolate;overflow:visible;border:2px solid #f1d49e;border-radius:17px;background:linear-gradient(145deg,#f9edd3,#8c957a 45%,#264854);box-shadow:inset 0 1px #fff8df,0 0 0 2px #4e4b3eaa,0 4px 9px #15313a66;transition:filter .12s,transform .12s}
.mobile-native-icon{display:block;position:absolute;width:32px;height:32px;left:50%;top:50%;margin:-16px 0 0 -16px;background-repeat:no-repeat;image-rendering:auto;pointer-events:none;transform:scale(1.35);border-radius:6px}
.mobile-skill-shade{position:absolute;inset:0;border-radius:14px;background:conic-gradient(from 0deg,#061c30c9 var(--cooldown,0deg),transparent 0);pointer-events:none;opacity:0}
.mobile-skill.is-cooling .mobile-skill-shade{opacity:1}
.mobile-skill-countdown{position:absolute;inset:0;display:grid;place-items:center;font-size:19px;color:#fffbe4;text-shadow:0 1px 3px #000,0 0 4px #000;font-variant-numeric:tabular-nums;pointer-events:none}
.mobile-skill-rank{position:absolute;bottom:1px;right:2px;min-width:15px;border-radius:5px;background:#163846df;color:#fff1c7;font-size:9px;padding:1px 2px;pointer-events:none}
.mobile-skill-name{position:absolute;top:55px;left:-5px;right:-5px;color:#fff7dc;font-size:8px;line-height:10px;font-weight:bold;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:0 1px 2px #102d3c,0 0 4px #102d3c;pointer-events:none}
#seal-mobile-controls .mobile-skill:disabled{opacity:1;filter:saturate(.35)}
.mobile-skill:disabled .mobile-native-icon{opacity:.5}
.mobile-skill.is-cooling:disabled .mobile-native-icon{opacity:.85}
.mobile-skill-pages{position:absolute;top:0;left:25px;right:9px;height:40px;display:flex;align-items:center;justify-content:space-between;pointer-events:auto}
.mobile-skill-pages button{border:1px solid #efd8a481;width:44px;height:44px;border-radius:13px;background:#173e4ba8;color:#fff0c6;font:bold 26px/1 Georgia;box-shadow:inset 0 1px #fff3bf33}
.mobile-skill-pages span{font-size:9px;font-weight:bold;letter-spacing:.5px;text-shadow:0 1px 3px #183244}
.mobile-action{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;width:48px;height:48px;padding:5px;border-radius:50%;border:1.5px solid #e7d09c;background:linear-gradient(145deg,#557772e0,#163e4de8);box-shadow:inset 0 2px #fff3c34d,inset 0 -3px #102c4159,0 3px 10px #102f4366;color:#fff3d1;transition:transform .12s,filter .12s}
.mobile-action span{font-size:7px;font-weight:bold;letter-spacing:.3px}
.mobile-attack{width:84px;height:84px;right:12px;bottom:5px;border:2px solid #ffe2a0;background:radial-gradient(circle at 40% 25%,#d4a765df,#956333de 58%,#3a3c3deb);box-shadow:inset 0 2px 5px #fff6cf99,inset 0 -4px 8px #4f321673,0 0 0 3px #183c4cb3,0 4px 17px #0d2c3e80}
.mobile-attack svg{width:35px;height:35px;stroke-width:1.5}.mobile-attack span{font-size:10px;letter-spacing:1px}
.mobile-attack i{position:absolute;inset:5px;border-radius:50%;border:1px solid #fff1c43d;pointer-events:none}
.mobile-interact{right:112px;bottom:15px}.mobile-target{right:168px;bottom:39px}
.seal-input-mobile .mobile-target-hint{display:block;position:absolute;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 157px + var(--control-lift));left:max(12px,env(safe-area-inset-left));max-width:139px;text-align:center;font-size:10px;line-height:14px;color:#fff5d6;text-shadow:0 1px 3px #132b3f,0 0 4px #132b3f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.seal-input-mobile .mobile-consumables{position:absolute;display:flex;gap:8px;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 188px + var(--control-lift));left:max(20px,env(safe-area-inset-left));pointer-events:auto}
.mobile-item{position:relative;width:49px;height:49px;border:1.5px solid #e7d09c;border-radius:15px;background:#214956ba;box-shadow:inset 0 1px #fff0cd66,0 3px 9px #18374355}
.mobile-item .mobile-native-icon{transform:scale(1.1)}.mobile-item>span{position:absolute;top:49px;left:-5px;right:-5px;font-size:8px;color:#fff5d9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 3px #17313d;pointer-events:none}
.mobile-item-count{position:absolute;right:2px;bottom:2px;font-size:9px;color:#fff9da;text-shadow:0 1px 2px #102734;pointer-events:none}
.mobile-no-skills{grid-column:1/-1;font-size:11px;text-align:center;line-height:1.5;margin:22px 0;color:#fff4d8;text-shadow:0 1px 3px #14323d}
.mobile-action:active,.mobile-tool:active,.mobile-skill:active,.mobile-item:active,.mobile-action.is-held{transform:scale(.94);filter:brightness(1.25)}
.is-fired{animation:mobile-activate .3s ease-out}@keyframes mobile-activate{0%{filter:brightness(1.8);box-shadow:0 0 0 4px #fff0ba99,0 0 23px #fff0ba80}100%{filter:brightness(1)}}
/* Existing Seal panels retain their art and behavior in this layout. */
.seal-input-mobile #hud .adventurer-hud{left:var(--hud-left);top:var(--hud-top);width:var(--vitals-width);grid-template-columns:34px minmax(0,1fr);gap:1px 5px;transform:none!important;padding:5px 8px;border-radius:16px}
.seal-input-mobile .adventurer-heading{min-height:16px}.seal-input-mobile .adventurer-heading strong{font-size:13px}.seal-input-mobile .adventurer-medal{transform:scale(.7);transform-origin:left center}.seal-input-mobile .adventurer-medal b{font-size:13px}
.seal-input-mobile .adventurer-gauge{margin-top:0;margin-bottom:1px}.seal-input-mobile .gauge-track{height:12px}.seal-input-mobile .gauge-exp .gauge-track{height:8px}.seal-input-mobile .gauge-track strong{font-size:9px;line-height:10px}.seal-input-mobile .adventurer-footer{font-size:8px;margin-top:2px}.seal-input-mobile .adventurer-lobby{display:none}
.seal-input-mobile #hud .seal-hotbar{display:none!important}
.seal-input-mobile #hud .seal-mainbar{display:none!important}
.seal-input-mobile #seal-mobile-controls{z-index:1400}
.seal-input-mobile #seal-mobile-controls[data-blocked=true] .mobile-joystick,.seal-input-mobile #seal-mobile-controls[data-blocked=true] .mobile-action-pad,.seal-input-mobile #seal-mobile-controls[data-blocked=true] .mobile-consumables,.seal-input-mobile #seal-mobile-controls[data-blocked=true] .mobile-target-hint{visibility:hidden}
.seal-input-mobile #classic-ui [aria-label="Pet and helper"]{display:none!important}
.seal-input-mobile #classic-ui [aria-label="Guarder"]{display:none!important}
.seal-input-mobile body.seal-mobile-menu-open #classic-ui [aria-label="Guarder"]:not([hidden]){display:block!important;left:99px!important;top:390px!important;z-index:100!important}
.seal-input-mobile body.seal-mobile-menu-open #classic-ui [aria-label="Pet and helper"]:not([hidden]){display:block!important;position:fixed!important;left:87px!important;right:auto!important;top:500px!important;bottom:auto!important;transform:scale(.5)!important;transform-origin:top left!important}
.seal-input-mobile #hud .seal-native-minimap{top:var(--menu-top);right:calc(var(--hud-right) + 50px);width:var(--minimap-width)!important;font-size:8px}
.seal-input-mobile .seal-native-map-buttons{display:none}
.seal-input-mobile #hud .seal-feature-deck{display:none!important}
.seal-input-mobile body.seal-mobile-menu-open .mobile-menu-panel {
 position:absolute;right:var(--hud-right);top:calc(var(--menu-top) + 50px);z-index:96;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:192px;
 max-height:calc(100dvh - var(--menu-top) - 58px - env(safe-area-inset-bottom));overflow:auto;
 padding:7px;border:1px solid #dfc38d;border-radius:12px;background:#173d4cf5;pointer-events:auto;
}
.mobile-menu-panel button{min-height:40px;border:1px solid #e9cf8c70;border-radius:8px;background:#e7d3991c;color:#fff0cb;font:bold 11px Tahoma,sans-serif}
.mobile-menu-panel>button{display:flex;align-items:center;justify-content:center;gap:4px;padding:3px}
#seal-mobile-controls .mobile-menu-panel svg{width:16px;height:16px}
.seal-input-mobile .mobile-menu-panel .mobile-mode{position:static;grid-column:1/-1}
.seal-input-mobile .mobile-menu-panel .mobile-mode-toggle{width:100%;min-height:38px;flex-direction:row;gap:5px}
.seal-input-mobile .mobile-menu-panel .mobile-mode-toggle span{font-size:11px}
.seal-input-mobile .mobile-menu-panel .mobile-mode-options{position:static;width:auto;margin-top:5px;padding:4px}
#seal-mobile-controls .mobile-menu-panel,#seal-mobile-controls .mobile-menu-panel button{touch-action:pan-y}
.seal-input-mobile.seal-mobile-menu-open #hud .seal-feature-deck,.seal-input-mobile body.seal-mobile-menu-open #hud .seal-feature-deck{display:block!important;position:fixed;left:max(10px,env(safe-area-inset-left));top:143px;bottom:auto!important;z-index:95;max-height:calc(100dvh - 155px);overflow-y:auto;overflow-x:hidden}
.seal-input-mobile .seal-native-level-tip,.seal-input-mobile .zone-notice,.seal-input-mobile .bottom-controls,.seal-input-mobile .build-badge{display:none!important}
.seal-mobile-typing .mobile-action-pad,.seal-mobile-typing .mobile-joystick,.seal-mobile-typing .mobile-consumables,.seal-mobile-typing .mobile-target-hint{visibility:hidden}
.seal-input-mobile { --stick-size:136px; --action-width:220px; --chat-height-mobile:min(90px,var(--stick-size)); --control-lift:0px; -webkit-text-size-adjust:100%; text-size-adjust:100% }
/* Use the game palette directly for small labels on touch screens. */
.seal-input-mobile :is(.actor-nameplate,.actor-vitals,.gauge-track strong,.locked-gauge b,.locked-exact) {
 -webkit-text-stroke:0;
 text-shadow:none;
}
.seal-input-mobile .gauge-track strong {display:grid;place-content:center;line-height:1}
.seal-input-mobile .gauge-exp .gauge-track {height:12px}
@media(orientation:landscape){
 .seal-input-mobile {--stick-size:clamp(96px,23vh,116px);--action-width:186px}
 .seal-input-mobile .mobile-stick-thumb {width:44px;height:44px;left:calc(50% - 22px);top:calc(50% - 22px)}
 .seal-input-mobile .mobile-stick-thumb img {inset:5px;width:30px;height:30px}
 .seal-input-mobile .mobile-target-hint {bottom:calc(max(16px,env(safe-area-inset-bottom)) + clamp(96px,23vh,116px) + 18px)}
 .seal-input-mobile .mobile-consumables {bottom:calc(max(16px,env(safe-area-inset-bottom)) + clamp(96px,23vh,116px) + 48px)}
 .seal-input-mobile .mobile-action-pad {--skill-size:clamp(44px,8vh,48px);height:calc(148px + 2 * var(--skill-size))}
 .seal-input-mobile .mobile-skills {top:46px;left:auto;right:7px;grid-template-columns:repeat(3,var(--skill-size));gap:14px 7px}
 .seal-input-mobile .mobile-skill {width:var(--skill-size);height:var(--skill-size);border-radius:13px}
 .seal-input-mobile .mobile-skill-shade {border-radius:11px}
 .seal-input-mobile .mobile-skill .mobile-native-icon {transform:scale(1.08)}
 .seal-input-mobile .mobile-skill-name {top:var(--skill-size)}
 .seal-input-mobile .mobile-skill-pages {top:0;left:26px;right:7px;height:44px;pointer-events:none}
 .seal-input-mobile .mobile-attack {width:68px;height:68px;right:7px}
 .seal-input-mobile .mobile-attack svg {width:29px;height:29px}
 .seal-input-mobile .mobile-interact {right:82px;bottom:8px}
 .seal-input-mobile .mobile-target {right:134px;bottom:21px}
 .seal-input-mobile body.seal-mobile-menu-open #hud .seal-feature-deck{top:99px;max-height:calc(100dvh - 110px)}
 .seal-input-mobile body.seal-mobile-menu-open #classic-ui [aria-label="Guarder"]{left:255px!important;top:99px!important}
 .seal-input-mobile body.seal-mobile-menu-open #classic-ui [aria-label="Pet and helper"]{left:245px!important;top:210px!important;transform:scale(.45)!important}
}
@media(max-width:375px){.seal-input-mobile{--stick-size:122px;--action-width:215px}.seal-input-mobile .mobile-joystick{left:max(8px,env(safe-area-inset-left))}.seal-input-mobile .mobile-action-pad{right:2px}}
@media(max-height:360px) and (orientation:landscape){
 .seal-input-mobile .mobile-target-hint{display:none!important}
 .seal-input-mobile #hud .seal-native-minimap{max-height:72px}
}
@media(prefers-reduced-motion:reduce){#seal-mobile-controls *{animation:none!important;transition:none!important}}

.seal-input-mobile #world{width:100%!important;height:100%!important;max-width:100%}
.seal-input-mobile #hud .seal-native-minimap{height:auto!important;max-height:100px}
.seal-input-mobile .seal-native-minimap canvas{height:auto!important}

.mobile-menu-panel button[aria-pressed=true]{background:#548b6b78;border-color:#d6e9a9;color:#fff9d9}
/* The touch HUD docks the existing chat log and composer between the two thumbs. */
.classic-chat-mobile-filters { display:none }
.seal-input-mobile #classic-chat {
  position:fixed;
  left:calc(max(12px,env(safe-area-inset-left)) + 2px + var(--stick-size) + 10px);
  right:calc(max(5px,env(safe-area-inset-right)) + var(--action-width) + 10px);
  bottom:max(10px,env(safe-area-inset-bottom));
  width:auto;
  max-width:460px;
  height:var(--chat-height-mobile)!important;
  margin-inline:auto;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  container:seal-chat / inline-size;
  overflow:hidden;
  border:1px solid #ddc28f9c;
  border-radius:12px;
  background:linear-gradient(125deg,#153943c9,#172f39b8);
  box-shadow:inset 0 1px #f7e6bc24,0 2px 6px #112c3729;
}
.seal-input-mobile #classic-chat :is(.classic-chat-size,.classic-chat-hide,.classic-chat-filters) { display:none }
.seal-input-mobile #classic-chat .classic-chat-log {
  position:static; grid-area:1/1; display:block; height:auto; min-height:0;
  padding:3px 9px; background:transparent; touch-action:pan-y;
  font:12px/16px Tahoma,Arial,sans-serif; color:#fff6dc; text-shadow:none;
}
.seal-input-mobile #classic-chat .classic-chat-line { min-height:16px }
.seal-input-mobile #classic-chat .classic-chat-form {
  grid-area:2/1; position:static; display:flex; gap:3px; height:auto; min-width:0;
  margin:0; padding:2px 4px; border-top:1px solid #eacb912f; background:#102d38b8;
}
.seal-input-mobile #classic-chat .classic-chat-form :is(input,select,button) {
  flex:none; height:32px; margin:0; padding:0 4px; border:0; border-radius:6px;
  color:#fff5d9; box-shadow:none;
}
.seal-input-mobile #classic-chat .classic-chat-form input {
  background:transparent; font:16px/1.2 Tahoma,sans-serif; width:0; flex:1; min-width:0;
}
.seal-input-mobile #classic-chat input::placeholder { color:#d7dfd7; font-size:13px }
.seal-input-mobile #classic-chat .classic-chat-form input:focus { background:#ffffff0b; outline:none }
.seal-input-mobile #classic-chat .classic-chat-form select {
  width:clamp(62px,21cqw,84px); background:#34555b; color:#ffe4a9; font:bold 12px Tahoma,sans-serif;
}
.seal-input-mobile #classic-chat .classic-chat-recipient:not([hidden]) { flex:0 1 90px; border-right:1px solid #ddc28f77 }
.seal-input-mobile #classic-chat .classic-chat-send {
  position:static; width:36px; background:#37646a url('/assets/ui/mainButton_All-0-39.png') center/21px 19px no-repeat;
}
.seal-input-mobile #classic-chat .classic-chat-mobile-filters {
  display:block; width:30px;
  background:linear-gradient(#e5cb96 0 0) center 10px/15px 2px no-repeat,
             linear-gradient(#e5cb96 0 0) center 15px/10px 2px no-repeat,
             linear-gradient(#e5cb96 0 0) center 20px/5px 2px no-repeat;
}
.seal-input-mobile #classic-chat .classic-chat-mobile-filters[aria-expanded=true] { background-color:#38595c }
.seal-input-mobile #classic-chat.chat-filters-open .classic-chat-log { visibility:hidden }
.seal-input-mobile #classic-chat.chat-filters-open .classic-chat-filters {
  position:static; grid-area:1/1; display:flex; flex-flow:row nowrap; align-items:center;
  justify-content:flex-start; gap:5px; width:auto; height:auto; padding:3px 7px;
  overflow-x:auto; overscroll-behavior:contain; touch-action:pan-x; background:transparent;
}
.seal-input-mobile #classic-chat .classic-chat-filter { flex:none; height:auto }
.seal-input-mobile #classic-chat .classic-chat-label { display:none }
.seal-input-mobile #classic-chat .classic-chat-check {
  width:auto; height:30px; padding:0 8px; background:#203b44; color:#c1cbc9;
  border:1px solid #728384; border-radius:12px; font:12px Tahoma,sans-serif;
}
.seal-input-mobile #classic-chat .classic-chat-check::after { content:attr(data-label) }
.seal-input-mobile #classic-chat .classic-chat-check[aria-pressed=true] { background:#425c58; border-color:#dfc592; color:#fff1c9 }
@container seal-chat (max-width:320px) {
  .seal-input-mobile #classic-chat .classic-chat-form:has(.classic-chat-recipient:not([hidden])) {
    display:grid; grid-template-columns:30px minmax(54px,auto) minmax(0,1fr) 36px;
  }
  .seal-input-mobile #classic-chat .classic-chat-form:has(.classic-chat-recipient:not([hidden])) input {
    width:100%; height:24px;
  }
  .seal-input-mobile #classic-chat .classic-chat-form:has(.classic-chat-recipient:not([hidden])) input[aria-label="Chat message"] { grid-column:1/4 }
  .seal-input-mobile #classic-chat .classic-chat-form:has(.classic-chat-recipient:not([hidden])) .classic-chat-send { grid-column:4; grid-row:1/3; align-self:stretch; height:auto }
}
@media (orientation:portrait) and (max-width:600px) {
  .seal-input-mobile { --control-lift:calc(var(--chat-height-mobile) + 6px) }
  .seal-input-mobile #classic-chat { left:max(10px,env(safe-area-inset-left)); right:max(10px,env(safe-area-inset-right)) }
}
.seal-input-mobile.seal-mobile-typing #classic-chat:focus-within {
  bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--mobile-keyboard,0px));
}

/* Reserve a top-row slot beside the player's vitals for the current target. */
.seal-input-mobile {
  --hud-left:max(8px,env(safe-area-inset-left));
  --hud-top:max(7px,env(safe-area-inset-top));
  --hud-right:max(8px,env(safe-area-inset-right));
  --minimap-width:94px;
  --menu-top:var(--hud-top);
  --vitals-width:232px;
  --target-left:calc(var(--hud-left) + var(--vitals-width) + 8px);
  --target-width:clamp(148px,24vw,196px);
}
.seal-input-mobile #hud #seal-locked-target {
  position:absolute; left:var(--target-left)!important; top:var(--hud-top)!important;
  width:var(--target-width)!important; transform:none; grid-template-columns:minmax(0,1fr);
  padding:6px 8px; gap:0; border:1px solid #cfad70; border-radius:11px;
  background:linear-gradient(120deg,#28474fef,#172d39f2);
  box-shadow:inset 0 1px #efdbad37,0 2px 5px #12212b55;
}
.seal-input-mobile #seal-locked-target .locked-sigil { display:none }
.seal-input-mobile #seal-locked-target .locked-eyeline {
  height:17px; margin-right:21px; overflow:hidden; white-space:nowrap; gap:4px;
  font-size:9px; letter-spacing:0;
}
.seal-input-mobile #seal-locked-target .locked-eyeline i { flex:none }
.seal-input-mobile #seal-locked-target .locked-eyeline [data-status] { overflow:hidden; text-overflow:ellipsis }
.seal-input-mobile #seal-locked-target .locked-name-row { gap:4px; margin:3px 0 0 }
.seal-input-mobile #seal-locked-target .locked-name-row strong { font-size:14px; line-height:17px }
.seal-input-mobile #seal-locked-target .locked-name-row [data-level] { font-size:9px }
.seal-input-mobile #seal-locked-target .locked-gauge { min-height:22px }
.seal-input-mobile #seal-locked-target .locked-track { height:7px }
.seal-input-mobile #seal-locked-target .locked-gauge b { min-width:28px; font-size:10px }
.seal-input-mobile #seal-locked-target .locked-exact { font:10px/13px Tahoma,sans-serif; overflow-wrap:anywhere }
.seal-input-mobile #seal-locked-target .locked-dismiss {
  position:absolute; top:2px; right:2px; width:27px; height:27px;
  background:transparent; border:0; color:#f4dfb5; font-size:18px;
}
@media (orientation:landscape) {
  .seal-input-mobile { --vitals-width:clamp(156px,33vw,202px) }
}
@media (orientation:landscape) and (max-width:769px) {
  .seal-input-mobile { --target-width:min(196px,calc(100% - var(--target-left) - var(--hud-right) - 58px - var(--minimap-width))) }
}
@media (orientation:landscape) and (max-height:360px) {
  .seal-input-mobile { --minimap-width:72px }
}
@media (orientation:portrait) and (max-width:600px) {
  .seal-input-mobile { --vitals-width:clamp(150px,48vw,224px); --target-width:min(205px,calc(100% - var(--target-left) - var(--hud-right))); --menu-top:calc(var(--hud-top) + 98px) }
}
