/* Load after mobile-hud.css and mobile-consumables.css. The adapter enables this skin. */
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] {
  position:absolute;
  inset:auto auto var(--centered-preview-bottom,var(--hud-bottom)) var(--centered-preview-left,var(--hud-left))!important;
  width:var(--centered-preview-width,236px)!important;
  max-width:calc(100% - var(--hud-left) - var(--hud-right));
  gap:0;
  pointer-events:none;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-preview {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:5px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-preview-events {
  grid-area:auto;
  padding:3px 5px;
  background:rgb(0 0 0 / .26);
  pointer-events:none;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-preview-open {
  grid-area:auto;
  min-height:0;
  padding:3px 5px;
  background:rgb(0 0 0 / .32);
  pointer-events:auto;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] :is(.mobile-chat-preview-lines,.mobile-chat-preview-events) {
  font-size:11px;
  line-height:13px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-nav-launcher] :is(.mobile-chat-preview-icon,.mobile-chat-launch) {display:none!important}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-hide {display:none!important}

html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"] {
  position:fixed;
  inset:0!important;
  z-index:7;
  display:grid;
  place-items:center;
  align-content:center;
  justify-items:center;
  width:auto!important;
  max-width:none;
  height:auto;
  padding:0;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"]::before {
  content:"";
  position:absolute;
  inset:0;
  background:rgb(0 0 0 / .4);
  pointer-events:auto;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-panel {
  position:relative;
  inset:auto;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:44px minmax(0,1fr) auto;
  width:min(388px,calc(var(--centered-chat-viewport-width,100vw) - 112px));
  height:min(246px,calc(var(--centered-chat-viewport-height,100dvh) - 24px));
  min-height:0;
  max-height:calc(var(--centered-chat-viewport-height,100dvh) - 12px);
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:6px;
  background:#1b1b1a;
  box-shadow:0 0 0 1px rgb(237 224 191 / .2);
  transform:translate(var(--centered-chat-offset-x,0px),var(--centered-chat-offset-y,0px));
  pointer-events:auto;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-panel > :is(.mobile-chat-header,.mobile-chat-log,.mobile-chat-picker,.mobile-chat-form) {
  grid-column:1;
  min-width:0;
  max-width:100%;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-panel[data-picker-open] {
  width:min(388px,calc(var(--centered-chat-viewport-width,100vw) - 112px));
  height:min(344px,calc(var(--centered-chat-viewport-height,100dvh) - 16px));
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-header {
  grid-row:1;
  display:flex;
  align-items:center;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:0 0 0 8px;
  border-bottom:0;
  box-shadow:inset 0 -1px rgb(255 255 255 / .13);
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-context {
  flex:1 1 0;
  min-width:0;
  height:44px;
  min-height:44px;
  padding:0 8px 0 0;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-contract {
  width:44px;
  min-width:44px;
  height:44px;
  padding:0;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-contract :is(svg,i) {width:18px;height:18px}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-log {
  grid-row:2;
  align-self:stretch;
  min-height:0;
  height:auto;
  max-height:none;
  padding:8px;
  overflow:auto;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-panel[data-readonly] .mobile-chat-log {grid-row:2 / 4;height:auto}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-form {
  grid-row:3;
  width:100%;
  min-height:57px;
  margin:0;
  padding:6px 8px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-form input {
  flex:1 1 0;
  width:0;
  min-width:0;
  height:44px;
  min-height:44px;
  padding:0 9px;
  font-size:16px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-send {flex:0 0 44px;width:44px;height:44px}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-picker {
  grid-row:2;
  align-self:stretch;
  justify-self:stretch;
  width:100%;
  height:auto;
  min-height:0;
  margin:0;
  padding:4px;
  overflow:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-rows:minmax(44px,auto);
  align-content:start;
  min-width:0;
  width:100%;
  gap:3px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] :is(.mobile-chat-tile,.mobile-chat-picker-close) {min-height:44px}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-grid .mobile-chat-picker-close,
html.mobile-hud #world-hud #mobile-chat[data-centered-chat] .mobile-chat-grid:has([data-chat-choice="9"]:not([hidden])) .mobile-chat-picker-close {
  grid-column:1 / -1;
  justify-self:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  padding:0 10px;
  background:none;
  box-shadow:none;
  gap:6px;
}

/* These measured positions supersede the old skill-dock side-lane overrides. */
html.mobile-hud #world-hud[data-centered-chat-layout] #movement-stick {
  left:var(--centered-stick-left)!important;
  top:var(--centered-stick-top)!important;
  right:auto!important;
  bottom:auto!important;
  width:var(--centered-stick-size)!important;
  height:var(--centered-stick-size)!important;
}
html.mobile-hud #world-hud[data-centered-chat-layout] .mobile-fullscreen {
  left:var(--centered-fullscreen-left)!important;
  top:var(--centered-fullscreen-top)!important;
  right:auto!important;
  bottom:auto!important;
}

/* Focused writing uses the existing composer at the visible viewport's bottom. */
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] {
  inset:var(--mobile-chat-vv-top,0px) auto auto var(--mobile-chat-vv-left,0px)!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  z-index:9;
  width:var(--mobile-chat-vv-width,100%)!important;
  height:var(--mobile-chat-vv-height,100%);
  min-height:0;
  max-width:none;
  margin:0;
  padding:6px max(8px,env(safe-area-inset-right,0px)) max(6px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));
  box-sizing:border-box;
  overflow:hidden;
  background:none;
  pointer-events:none;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"]::before {
  display:block;
  content:"";
  position:absolute;
  inset:0;
  background:rgb(0 0 0 / .18);
  pointer-events:auto;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] > :not(.mobile-chat-panel),
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-panel > :not(.mobile-chat-form) {display:none!important}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-panel {
  position:relative;
  inset:auto;
  display:block;
  flex:0 1 auto;
  width:min(640px,100%);
  min-width:0;
  height:auto;
  min-height:0;
  max-width:100%;
  max-height:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:6px;
  overflow:auto;
  background:none;
  box-shadow:none;
  transform:none;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-form {
  display:grid;
  grid-template-columns:44px max-content minmax(44px,1fr) 44px;
  align-items:center;
  gap:4px 6px;
  width:100%;
  min-width:0;
  min-height:56px;
  margin:0;
  padding:6px 8px;
  border:0;
  border-radius:6px;
  background:rgb(17 18 17 / .94);
  box-shadow:inset 0 0 0 1px rgb(237 224 191 / .2);
  pointer-events:auto;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-compose-back {
  grid-column:1;
  grid-row:1;
  display:grid;
  place-items:center;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  margin:0;
  padding:0;
  border:0;
  border-radius:4px;
  background:none;
  color:var(--mobile-chat-warm,#ead8b1);
  touch-action:manipulation;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-compose-back svg {display:block;width:20px;height:20px}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-destination {
  grid-column:2;
  grid-row:1;
  display:block;
  min-width:0;
  max-width:clamp(54px,calc(var(--mobile-chat-vv-width,100vw) * .22),160px);
  overflow:hidden;
  color:var(--mobile-message-color,var(--mobile-chat-warm,#ead8b1));
  font:600 12px/1.2 "Segoe UI",Arial,sans-serif;
  text-overflow:ellipsis;
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-input {
  grid-column:3;
  grid-row:1;
  width:100%;
  min-width:0;
  max-width:100%;
  height:44px;
  min-height:44px;
  margin:0;
  padding:0 9px;
  font-size:16px;
  text-overflow:clip;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-send {
  grid-column:4;
  grid-row:1;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
}
html.mobile-hud #world-hud #mobile-chat[data-centered-chat][data-state="expanded"][data-composing="true"] .mobile-chat-compose-note {
  grid-column:1 / -1;
  grid-row:2;
  min-width:0;
  margin:0;
  padding:0 2px;
  color:#f3c49d;
  font:12px/1.35 "Segoe UI",Arial,sans-serif;
  overflow-wrap:anywhere;
}
