/* Auto configuration dialog; floating HUD controls removed. */
.compact-panel.auto-pk-panel.pk-state-menu{transform:none!important;inset:auto;width:218px;max-width:calc(100vw - 12px);box-sizing:border-box;margin:0}
/* Modal Window "Tự Động" */
.auto-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 410px;
  max-width: calc(100vw - 20px);
  padding: 0;
  margin: 0;
  background: #111614;
  border: 2px solid #a8873e;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95), 0 0 15px rgba(168, 135, 62, 0.4);
  color: #eadcb9;
  font-family: 'Phong Than PC v1.1', Tahoma, 'TG Vietnamese Serif', serif;
  font-size: 12px;
  z-index: 100;
  overflow: visible;
}

.auto-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(1.5px);
}

/* Authentic Ornate Frame & Background */
.auto-dialog-inner {
  position: relative;
  background: radial-gradient(circle at 50% 30%, #1e2621 0%, #0d1210 100%);
  border: 1px solid #574421;
  padding: 8px 12px 12px;
  border-radius: 2px;
}

/* Flame Totem Emblem on Top-Left */
.auto-flame-emblem {
  position: absolute;
  top: -22px;
  left: -8px;
  width: 44px;
  height: 60px;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(255, 120, 0, 0.6));
  z-index: 10;
}

/* Window Header Bar */
.auto-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 38px;
  margin-bottom: 8px;
}

.auto-title-banner {
  background: linear-gradient(180deg, #5c1818 0%, #2f0707 100%);
  border: 1.5px solid #d4af37;
  border-radius: 4px;
  padding: 3px 36px;
  color: #ffe694;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(240, 175, 45, 0.8);
  box-shadow: inset 0 1px 2px rgba(255, 200, 100, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.8);
}

.auto-close-swords {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #5b361a 20%, #241407 90%);
  border: 1.5px solid #dfb758;
  color: #ffeb99;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 2px #ffdf85, 0 2px 4px rgba(0, 0, 0, 0.8);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.auto-close-swords:hover {
  transform: scale(1.08);
  filter: brightness(1.25);
  border-color: #fff0aa;
}

/* Tabs Rows */
.auto-tabs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 5px;
}

.auto-subtabs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}

.auto-tab-btn, .auto-subtab-btn {
  background: linear-gradient(180deg, #441414 0%, #240808 100%);
  border: 1.5px solid #947131;
  border-radius: 2px;
  color: #e5cd9e;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 2px;
  cursor: pointer;
  text-align: center;
  text-shadow: 1px 1px 2px #000;
  box-shadow: inset 0 1px 1px rgba(255, 180, 100, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.7);
  transition: all 0.15s ease;
}

.auto-tab-btn:hover, .auto-subtab-btn:hover {
  filter: brightness(1.2);
  color: #fff0b8;
}

.auto-tab-btn.active, .auto-subtab-btn.active {
  background: linear-gradient(180deg, #781c1c 0%, #440d0d 100%);
  border-color: #ffd759;
  color: #fff2ba;
  box-shadow: 0 0 6px rgba(255, 215, 89, 0.4), inset 0 1px 2px #ffc97a;
}

/* Inner Body Card */
.auto-card-panel {
  background: rgba(14, 20, 16, 0.85);
  border: 1.5px solid #846d37;
  border-radius: 5px;
  padding: 10px 12px;
  min-height: 275px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
}

/* Custom Authentic Checkboxes */
.auto-row-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #ebdcb2;
}

.auto-row-check input[type="checkbox"] {
  display: none;
}

.auto-check-custom {
  width: 15px;
  height: 15px;
  flex: none;
  background: linear-gradient(180deg, #1f1b13 0%, #100d08 100%);
  border: 1.5px solid #a88a44;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: all 0.12s ease;
}

.auto-row-check input[type="checkbox"]:checked + .auto-check-custom {
  background: linear-gradient(180deg, #3d1b06 0%, #1f0b02 100%);
  border-color: #ffc952;
  box-shadow: 0 0 4px rgba(255, 170, 34, 0.5);
}

.auto-row-check input[type="checkbox"]:checked + .auto-check-custom::after {
  content: "✓";
  color: #ffaa22;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 3px #ffe277;
}

.auto-label-text {
  line-height: 1.2;
}

/* Sliders with Diamond Thumb */
.auto-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.auto-slider-wrap {
  position: relative;
  flex: 1;
  height: 8px;
  background: #171c19;
  border: 1px solid #635028;
  border-radius: 4px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.auto-slider-wrap.hp-track {
  background: #2b0b0b;
}

.auto-slider-wrap.mp-track {
  background: #091c2e;
}

.auto-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
  pointer-events: none;
}

.hp-track .auto-slider-fill {
  background: linear-gradient(90deg, #941717, #d92929);
}

.mp-track .auto-slider-fill {
  background: linear-gradient(90deg, #104e8c, #1f7be0);
}

.auto-slider-wrap input[type="range"] {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.auto-slider-thumb-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #00d9ff 30%, #0d5687 90%);
  border: 1.5px solid #ffe68d;
  box-shadow: 0 0 4px #00e1ff, 0 1px 3px #000;
  pointer-events: none;
  z-index: 2;
}

.auto-val-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auto-val-box input,
.auto-input-inline input,
.auto-input-row input {
  width: 52px;
  height: 22px;
  padding: 1px 4px;
  background: #0a0e0c;
  border: 1px solid #756133;
  border-radius: 2px;
  color: #fff2c4;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.auto-val-box input:focus,
.auto-input-inline input:focus,
.auto-input-row input:focus,
.auto-select-dark:focus {
  outline: 1px solid #ffd45e;
  border-color: #ffd45e;
}

/* Sub-group layout for portal & pk */
.auto-sub-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 2px;
}

.auto-grid-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auto-input-inline {
  display: flex;
  align-items: center;
  gap: 5px;
}

.auto-grid-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auto-grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
}

.auto-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-input-row input {
  margin-left: auto;
}

.auto-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Select element */
.auto-select-dark {
  background: #0e1410;
  border: 1px solid #756133;
  border-radius: 2px;
  color: #ffe694;
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  height: 24px;
  cursor: pointer;
}

/* PK Group Box */
.auto-pk-group-box {
  border: 1px solid #6b5527;
  border-radius: 3px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(8, 12, 10, 0.45);
}

/* Waypoints Box (Screenshot 4) */
.auto-waypoints-box {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 6px;
  height: 84px;
}

.waypoints-list {
  background: #070a08;
  border: 1px solid #6b5527;
  border-radius: 2px;
  padding: 4px;
  overflow-y: auto;
  font-size: 11px;
}

.wp-item {
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 2px;
}

.wp-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wp-item.selected {
  background: #4a3614;
  color: #ffe48e;
}

.wp-empty {
  color: #8b7d60;
  text-align: center;
  padding-top: 24px;
}

.waypoints-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auto-btn-small {
  flex: 1;
  background: linear-gradient(180deg, #521515 0%, #2f0808 100%);
  border: 1px solid #947131;
  border-radius: 2px;
  color: #e5cd9e;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 1px 1px 2px #000;
  transition: all 0.12s ease;
}

.auto-btn-small:hover {
  filter: brightness(1.2);
  border-color: #ffd759;
}

/* Skill Sockets (Screenshots 4 & 5) */
.auto-socket-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 0;
}

.auto-skill-socket {
  position: relative;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #1a221d 30%, #0d120f 90%);
  border: 1.5px solid #6b5527;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9);
  transition: all 0.15s ease;
}

.auto-skill-socket:hover {
  border-color: #ffd759;
  box-shadow: 0 0 8px rgba(255, 215, 89, 0.4);
}

.auto-socket-placeholder {
  width: 28px;
  height: 28px;
  opacity: 0.35;
  filter: grayscale(1) invert(0.6);
  pointer-events: none;
}

.auto-socket-canvas {
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
}

.auto-socket-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7a1515;
  border: 1px solid #ff9e9e;
  color: #fff;
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.auto-skill-socket:hover .auto-socket-remove {
  display: flex;
}

/* Pot Counts & Banner Button (Screenshot 5) */
.auto-pot-counts {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 22px;
}

.auto-pot-counts input {
  width: 40px;
  height: 22px;
  background: #0a0e0c;
  border: 1px solid #756133;
  color: #fff2c4;
  text-align: center;
  font-weight: bold;
}

.auto-btn-banner {
  background: linear-gradient(180deg, #7c1a1a 0%, #440c0c 100%);
  border: 1.5px solid #c99e46;
  border-radius: 3px;
  padding: 6px 12px;
  color: #ffea99;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  text-shadow: 1px 1px 2px #000;
  box-shadow: inset 0 1px 2px rgba(255, 220, 120, 0.4), 0 2px 5px rgba(0, 0, 0, 0.6);
  transition: all 0.15s ease;
  margin: 4px 0;
}

.auto-btn-banner:hover {
  filter: brightness(1.2);
  border-color: #ffe88a;
}

/* Dialog Footer Buttons: [Lưu] and [Bật / Tắt] */
.auto-dialog-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.auto-btn-main {
  background: linear-gradient(180deg, #701616 0%, #3e0707 100%);
  border: 1.5px solid #dfb758;
  border-radius: 3px;
  padding: 6px 0;
  color: #ffe694;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  text-shadow: 1px 1px 2px #000, 0 0 4px rgba(255, 200, 50, 0.6);
  box-shadow: inset 0 1px 2px rgba(255, 220, 120, 0.4), inset 0 -2px 3px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: all 0.15s ease;
}

.auto-btn-main:hover {
  filter: brightness(1.2);
  border-color: #fff0aa;
}

.auto-btn-main.is-active-btn {
  background: linear-gradient(180deg, #1d6e26 0%, #0d3d14 100%);
  border-color: #6fe97a;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(61, 245, 61, 0.5), inset 0 1px 2px #a6ffb0;
}

/* Skill Picker Popover */
.auto-skill-picker-modal {
  position: absolute;
  z-index: 120;
  background: #111814;
  border: 1.5px solid #dfb758;
  border-radius: 4px;
  padding: 6px;
  width: 220px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auto-skill-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 3px;
  background: transparent;
  border: 1px solid transparent;
  color: #eadcb9;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}

.auto-skill-picker-item:hover {
  background: #3d2c12;
  border-color: #caa452;
  color: #fff3c4;
}

.auto-skill-picker-item canvas {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}

/* Styles for Sub-Tabs: Dị Nhân, Giáp Sĩ, Khác */
.auto-socket-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 10px;
  justify-content: center;
  margin: 6px 0 8px;
}

.auto-weapon-swap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0;
}

.auto-btn-weapon {
  background: linear-gradient(180deg, #5c1818 0%, #2f0707 100%);
  border: 1px solid #947131;
  color: #ffe694;
  padding: 4px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: inset 0 1px 1px rgba(255, 180, 100, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.7);
  transition: all 0.12s ease;
}

.auto-btn-weapon:hover {
  filter: brightness(1.2);
  border-color: #ffd759;
}

.auto-segmented-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 4px 0;
}

.auto-segment-btn {
  background: linear-gradient(180deg, #441414 0%, #240808 100%);
  border: 1px solid #755b27;
  color: #e5cd9e;
  font-family: inherit;
  font-size: 11px;
  padding: 3px 2px;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  border-radius: 2px;
  box-shadow: inset 0 1px 1px rgba(255, 180, 100, 0.3);
  transition: all 0.12s ease;
}

.auto-segment-btn:hover {
  filter: brightness(1.2);
  color: #fff0b8;
}

.auto-segment-btn.active {
  background: linear-gradient(180deg, #6c1616 0%, #3a0808 100%);
  border-color: #ffd759;
  color: #fff2ba;
  box-shadow: 0 0 5px rgba(255, 215, 89, 0.4), inset 0 1px 2px #ffc97a;
}

.auto-combo-action-row {
  display: grid;
  grid-template-columns: 16px 1fr 64px;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
}

.auto-btn-combo-slot {
  background: linear-gradient(180deg, #521515 0%, #290808 100%);
  border: 1px solid #85652a;
  color: #ebd4a7;
  padding: 3px 6px;
  font-size: 11px;
  font-family: inherit;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.auto-btn-combo-slot:hover {
  filter: brightness(1.2);
  border-color: #ffd759;
}

.auto-tactics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 5px 0;
}

.auto-btn-tactics-slot {
  background: linear-gradient(180deg, #521515 0%, #290808 100%);
  border: 1px solid #85652a;
  color: #ebd4a7;
  padding: 4px 6px;
  font-size: 11px;
  font-family: inherit;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.auto-btn-tactics-slot:hover {
  filter: brightness(1.2);
  border-color: #ffd759;
}

.auto-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: #ebdcb2;
}

.auto-note-text {
  font-size: 11px;
  color: #d0c29d;
  margin-top: auto;
  padding-top: 6px;
  text-shadow: 1px 1px 2px #000;
}


/* =========================================================
   AUTHENTIC PHONG THẦN FSWEB AUTO DIALOG
   (Exact match for user screenshot media_1794874709733_afdf2a99.jpg)
   ========================================================= */

.fs-auto-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 325px;
  max-width: 95vw;
  padding: 0;
  margin: 0;
  background: #090704;
  border: 2px solid #8e6a2b;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.95), 0 0 18px rgba(142, 106, 43, 0.45);
  color: #ecd8a5;
  font-family: 'Phong Than PC v1.1', Tahoma, 'TG Vietnamese Serif', serif;
  font-size: 12px;
  z-index: 100;
  overflow: visible;
  user-select: none;
}

.fs-auto-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(1.5px);
}

.fs-auto-inner {
  position: relative;
  background: #0c0906;
  border: 1px solid #483414;
  padding: 6px 12px 12px;
}

/* Header Banner */
.fs-auto-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 28px;
  margin-bottom: 5px;
}

.fs-auto-flame {
  position: absolute;
  top: -14px;
  left: -6px;
  width: 28px;
  height: 38px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(255, 100, 0, 0.7));
}

.fs-auto-title-banner {
  margin: 0;
  background: linear-gradient(180deg, #591616 0%, #260505 100%);
  border: 1.5px solid #d4af37;
  border-radius: 3px;
  padding: 2px 28px;
  color: #ffec9e;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 1px 2px #000, 0 0 5px rgba(255, 215, 80, 0.8);
  box-shadow: inset 0 1px 2px rgba(255, 200, 100, 0.4), inset 0 -2px 3px rgba(0, 0, 0, 0.8);
}

.fs-auto-status-pill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1px solid #6c572b;
  background: #14120c;
  color: #b7ad8e;
}

.fs-auto-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6c7270;
}

.fs-auto-status-pill.is-on {
  border-color: #4f9e66;
  background: #0e2418;
  color: #8dffb5;
}

.fs-auto-status-pill.is-on::before {
  background: #67f79a;
  box-shadow: 0 0 6px #67f79a;
}

.fs-auto-status-pill.is-on.is-pvp {
  border-color: #d65b3f;
  background: #2b0f0c;
  color: #ffb199;
}

.fs-auto-status-pill.is-on.is-pvp::before {
  background: #ff6242;
  box-shadow: 0 0 6px #ff6242;
}

.fs-auto-close {
  position: absolute;
  right: -2px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #631515 20%, #290404 90%);
  border: 1.5px solid #d4af37;
  color: #ffeb99;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: transform 0.1s ease, filter 0.15s ease;
  padding: 0;
  line-height: 1;
}

.fs-auto-close:hover {
  transform: scale(1.1);
  filter: brightness(1.25);
  border-color: #fff0aa;
}

/* Rows */
.fs-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  margin-bottom: 0;
}

.fs-auto-chk-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #ebdcb2;
}

.fs-auto-chk-wrap input[type="checkbox"] {
  display: none;
}

.fs-auto-chk-box {
  width: 14px;
  height: 14px;
  flex: none;
  background: #070503;
  border: 1.5px solid #9c752c;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: all 0.12s ease;
}

.fs-auto-chk-wrap input[type="checkbox"]:checked + .fs-auto-chk-box {
  background: #1c150b;
  border-color: #ffc952;
}

.fs-auto-chk-wrap input[type="checkbox"]:checked + .fs-auto-chk-box::after {
  content: "✓";
  color: #ffd700;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 3px #ffe277;
}

.fs-auto-input-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
}

html body.ingame #app .fs-auto-dialog .fs-auto-num-input,
.fs-auto-num-input {
  width: 60px;
  min-width: 60px;
  height: 24px;
  padding: 0 4px;
  background: #050402;
  border: 1.5px solid #8a6625;
  border-radius: 3px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.fs-auto-num-input:focus, .fs-auto-select:focus {
  outline: 1px solid #ffd45e;
  border-color: #ffd45e;
}

.fs-auto-unit-text {
  font-style: normal;
  color: #ecd8a5;
  font-size: 12px;
}

/* Select */
.fs-auto-select {
  background: #090704;
  border: 1.5px solid #8a6625;
  border-radius: 2px;
  color: #ffd97d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 4px;
  height: 24px;
  cursor: pointer;
  white-space: nowrap;
}

.fs-auto-select-pet {
  width: 175px;
}

/* Rotation Group */
.fs-auto-rotation-group {
  border: 1px solid #6b501d;
  border-radius: 2px;
  padding: 4px 5px 5px;
  margin: 2px 0 0;
}

.fs-auto-rotation-legend {
  color: #ecd8a5;
  font-size: 11px;
  padding: 0 4px;
}

.fs-auto-rotation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
}

.fs-auto-rotation-grid select {
  width: 100%;
  min-width: 0;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 1px 2px !important;
  height: 24px;
  text-overflow: ellipsis;
}

/* Note Text */
.fs-auto-note {
  font-size: 11px;
  color: #bda66d;
  line-height: 1.35;
  margin: 5px 0 10px;
}

/* Actions */
.fs-auto-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fs-auto-actions .fs-auto-btn {
  width: auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}
.fs-auto-actions .fs-auto-btn-toggle {
  flex: 1 1 auto;
}
.fs-auto-actions .fs-auto-btn-sys {
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 12px;
  background: linear-gradient(180deg, #332a1a 0%, #19140c 100%);
  border-color: #9e8242;
  color: #f3de9f;
}

.fs-auto-btn {
  height: 32px;
  background: linear-gradient(180deg, #382414 0%, #150d06 100%);
  border: 1.5px solid #946f2c;
  border-radius: 4px;
  color: #ffea99;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 1px 2px #000;
  box-shadow: inset 0 1px 1px rgba(255, 220, 130, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.7);
  transition: all 0.15s ease;
}

.fs-auto-btn:hover {
  filter: brightness(1.16);
  border-color: #ffd759;
}

.fs-auto-btn-toggle.is-active {
  background: linear-gradient(180deg, #741616 0%, #3d0808 100%);
  border-color: #ea6458;
  color: #ffd9d2;
}

.fs-auto-sr-input,
.fs-auto-sr-select {
  display: none !important;
}

/* Mode Bar (Đánh quái / Đánh người) */
html body.ingame #app .fs-auto-dialog :is(bdi, em) {
  font-family: Tahoma, Arial, sans-serif !important;
  font-style: normal;
}

html body.ingame #app .fs-auto-dialog .fs-auto-chk-wrap bdi {
  font-weight: 400;
}

html body.ingame #app .fs-auto-dialog .classic-auto-tabs button {
  padding: 4px 6px;
  font-size: 12px;
  background: linear-gradient(180deg, #2b2316 0%, #15120c 100%);
  border: 1px solid #755b2c;
  color: #cbb98c;
}

html body.ingame #app .fs-auto-dialog .classic-auto-tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, #cf8a25 0%, #7d3e10 100%);
  border-color: #ffe384;
  color: #fff8dc;
  box-shadow: inset 0 1px 2px rgba(255, 240, 180, 0.45), 0 0 8px rgba(217, 151, 48, 0.3);
}

.fs-auto-mode-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

.fs-auto-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
  padding: 3px;
  border-radius: 5px;
  background: rgba(8, 10, 8, 0.85);
  border: 1px solid #6b5324;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8);
}

html body.ingame #app .fs-auto-dialog .fs-auto-mode-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #574520;
  background: linear-gradient(180deg, #211d14 0%, #12110c 100%);
  color: #b7a882;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

html body.ingame #app .fs-auto-dialog .fs-auto-mode-btn.is-pve[aria-pressed="true"],
html body.ingame #app .fs-auto-dialog .fs-auto-mode-btn.is-pve.is-selected {
  background: linear-gradient(180deg, #2d7a49 0%, #144226 100%);
  border-color: #e4c66b;
  color: #f6ffec;
  box-shadow: inset 0 1px 2px rgba(175, 255, 200, 0.35), 0 0 10px rgba(72, 196, 114, 0.35);
}

html body.ingame #app .fs-auto-dialog .fs-auto-mode-btn.is-pvp[aria-pressed="true"],
html body.ingame #app .fs-auto-dialog .fs-auto-mode-btn.is-pvp.is-selected {
  background: linear-gradient(180deg, #a62518 0%, #580d07 100%);
  border-color: #ffd66b;
  color: #fff4d6;
  box-shadow: inset 0 1px 2px rgba(255, 198, 130, 0.4), 0 0 12px rgba(226, 72, 38, 0.48);
}

.fs-auto-mode-summary {
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(24, 20, 12, 0.78);
  border: 1px solid #4e3f1f;
  color: #dfd0a6;
  font-size: 11px;
  line-height: 1.3;
}

/* PK Strategy Card */
.fs-auto-pk-card {
  border: 1px solid #745526;
  border-radius: 5px;
  padding: 5px 8px 6px;
  margin: 0;
  background: linear-gradient(180deg, rgba(42, 16, 12, 0.62) 0%, rgba(16, 11, 9, 0.84) 100%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.fs-auto-pk-card.is-active-mode {
  border-color: #d68b3e;
  box-shadow: inset 0 0 12px rgba(168, 44, 24, 0.25), 0 0 8px rgba(208, 120, 48, 0.18);
}

.fs-auto-pk-card.is-standby-mode {
  opacity: 0.78;
}

.fs-auto-card-legend {
  color: #ffd778;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 5px;
}

.fs-auto-pk-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 5px;
}

.fs-auto-pk-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.fs-auto-pk-inline .fs-auto-pk-label {
  flex: none;
  min-width: 56px;
}

.fs-auto-pk-inline .fs-auto-pill-group {
  flex: 1;
}

.fs-auto-combat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 8px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(16, 14, 10, 0.72);
  border: 1px solid #48391d;
}

.fs-auto-combat-grid .fs-auto-row {
  min-height: 20px;
}

@media(max-width:360px) {
  .fs-auto-combat-grid {
    grid-template-columns: 1fr;
  }
}

.fs-auto-pk-label {
  color: #e6d5a3;
  font-size: 11px;
  font-weight: 700;
}

.fs-auto-pill-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.fs-auto-pill-group-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

html body.ingame #app .fs-auto-dialog .fs-auto-pill {
  height: 24px;
  padding: 0 4px;
  border-radius: 3px;
  border: 1px solid #6b5327;
  background: linear-gradient(180deg, #251e13 0%, #14100a 100%);
  color: #c7b489;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

html body.ingame #app .fs-auto-dialog .fs-auto-pill[aria-pressed="true"],
html body.ingame #app .fs-auto-dialog .fs-auto-pill.is-selected {
  background: linear-gradient(180deg, #c77420 0%, #78370c 100%);
  border-color: #ffe285;
  color: #fff7dc;
  box-shadow: inset 0 1px 1px rgba(255, 236, 170, 0.5), 0 0 6px rgba(212, 128, 38, 0.35);
}

.fs-auto-pk-hint {
  display: block;
  color: #c9b583;
  font-size: 10px;
  line-height: 1.3;
}

html body.ingame #app .fs-auto-btn-toggle.is-pve-ready:not(.is-active) {
  background: linear-gradient(180deg, #3c7534 0%, #183d1b 100%);
  border-color: #d6b65e;
  color: #f4ffe6;
}

html body.ingame #app .fs-auto-btn-toggle.is-pvp-ready:not(.is-active) {
  background: linear-gradient(180deg, #a62b1c 0%, #571109 100%);
  border-color: #ffd266;
  color: #fff2cf;
}

html body.ingame #app .fs-auto-btn-toggle.is-active {
  background: linear-gradient(180deg, #6e1515 0%, #3a0707 100%);
  border-color: #ee6a5c;
  color: #ffdcd6;
}

.game-shell .hud-auto-switch.is-pk-mode[aria-pressed=true] {
  border-color: #ff8c52;
  background: linear-gradient(180deg, #5c221a, #2c0d0a);
  color: #ffe3b8;
  box-shadow: inset 0 0 0 1px #240906, 0 0 8px #ff6e4244;
}

.game-shell .hud-auto-switch.is-pk-mode[aria-pressed=true] .auto-state {
  background: #3d140f;
  color: #ffb18d;
}

.game-shell .hud-auto-switch.is-pk-mode[aria-pressed=true] i {
  background: #ff774f;
  box-shadow: 0 0 6px #ff774f;
}

@media(max-width:480px) {
  .fs-auto-pill-group-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fs-auto-status-pill {
    font-size: 9px;
    padding: 2px 5px;
  }
}
/* Compact, legible control below the HP/MP portrait frame. */
.game-shell .quick .hud-auto-switch{position:relative;left:auto;top:auto;width:38px;height:38px;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:2px;border:1px solid #bdb26a;border-radius:3px;background:linear-gradient(180deg,#302c26,#171a19);box-shadow:inset 0 0 0 1px #080b0b,0 2px 4px #0008;color:#c4c0ac;font:700 10px/1 Tahoma,sans-serif;letter-spacing:0;pointer-events:auto;z-index:5}
.game-shell .hud-auto-switch svg{display:none}
.game-shell .hud-auto-switch .auto-state{margin:0;padding:0;border-radius:0;background:none;color:#b6bdc1;font-size:12px;letter-spacing:.5px}
.game-shell .hud-auto-switch i{position:absolute;right:2px;top:2px;width:3px;height:3px;flex:none;border-radius:50%;background:#737b7b}
.game-shell .hud-auto-switch[aria-pressed=true]{border-color:#d9b95f;background:linear-gradient(180deg,#244433,#10251e);color:#ffecad;box-shadow:inset 0 0 0 1px #091b13,0 0 8px #6ddf9a33}
.game-shell .hud-auto-switch[aria-pressed=true] svg{color:#ffe391;filter:drop-shadow(0 0 2px #ebc35977)}
.game-shell .hud-auto-switch[aria-pressed=true] .auto-state{background:#102d22;color:#8dffb5}
.game-shell .hud-auto-switch[aria-pressed=true] i{background:#8dffb5;box-shadow:0 0 6px #79ffc0;animation:auto-status-glow 2s ease-in-out infinite}
.game-shell .hud-auto-switch:focus-visible{outline:2px solid #ffe7a0;outline-offset:3px}
@keyframes auto-status-glow{50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){.game-shell .hud-auto-switch i{animation:none!important}}

@media(max-height:550px) and (orientation:landscape){.game-shell .quick .hud-auto-switch{width:28px;height:28px;font-size:9px;gap:2px}.game-shell .hud-auto-switch .auto-state{font-size:10px}}
/* Fit browser chrome changes on Android; keep every setting reachable. */
body.ingame .compact-panel.fs-auto-dialog:not(.pk-state-menu){box-sizing:border-box;top:var(--auto-viewport-center,50dvh);max-height:calc(var(--auto-viewport-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}
body.ingame .fs-auto-dialog .fs-auto-row:has([name="autoPkMode"]){flex-wrap:wrap}
body.ingame .fs-auto-dialog .fs-auto-row:has(small){flex-wrap:wrap}
body.ingame .fs-auto-dialog .fs-auto-row>small{flex:1 0 100%;min-width:0;line-height:1.4}
body.ingame .fs-auto-dialog .fs-auto-row select{min-width:0;max-width:100%}
.game-shell .quick .activity-shortcut{position:relative;display:grid;place-items:center;width:36px;height:36px;min-height:0;padding:0;border:1px solid #c8a652;border-radius:3px;background:#101622;overflow:hidden;box-shadow:inset 0 0 0 1px #473d28}
.game-shell .quick .activity-shortcut img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.game-shell .quick .activity-shortcut span{position:absolute;inset:auto 0 0;line-height:9px;font:7px/9px Tahoma,Arial,sans-serif!important;color:#fff1bd;background:linear-gradient(transparent,#080c16ef);text-shadow:1px 1px #000;text-align:center;white-space:nowrap;pointer-events:none}
.game-shell .quick .activity-shortcut:focus-visible{outline:2px solid #fff0aa;outline-offset:2px}
@media(max-height:550px) and (orientation:landscape){.game-shell .quick .activity-shortcut{width:28px;height:28px}.game-shell .quick .activity-shortcut span{font-size:6px!important;line-height:8px!important}}
