/* v0.7.9：技能选择布局。固定六槽、类型筛选、统一卡片与移动端适配。 */

[data-ui79-skill-panel]{
  --ui79-gold:#d5ae67;
  --ui79-green:#62d99a;
  --ui79-purple:#b89bff;
  --ui79-red:#ff8d83;
  overflow:visible;
  border-color:rgba(213,174,103,.26) !important;
  background:
    radial-gradient(circle at 92% 0,rgba(213,174,103,.08),transparent 32%),
    linear-gradient(180deg,rgba(20,17,13,.98),rgba(10,11,13,.98)) !important;
}

[data-ui79-skill-panel] .ui79-skill-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center !important;
  gap:10px 14px !important;
  margin-bottom:18px !important;
}

[data-ui79-skill-panel] .ui79-skill-head > div:first-child{
  min-width:0;
}

[data-ui79-skill-panel] .ui79-skill-head h3{
  margin:0 0 5px !important;
}

[data-ui79-skill-panel] .ui79-skill-head p{
  max-width:720px;
  margin:0 !important;
  color:rgba(236,225,199,.66) !important;
  line-height:1.55;
}

[data-ui79-count],
[data-ui79-skill-panel] .ui79-skill-head > span{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-width:54px;
  min-height:34px;
  padding:0 12px !important;
  border:1px solid rgba(213,174,103,.35);
  border-radius:999px;
  background:rgba(213,174,103,.09);
  color:#ffe2a4 !important;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}

.ui79-reset-skills{
  width:auto !important;
  min-height:36px !important;
  padding:7px 12px !important;
  border:1px solid rgba(255,141,131,.34) !important;
  border-radius:10px !important;
  background:rgba(112,35,31,.16) !important;
  color:#ffb4ac !important;
  font-size:12px !important;
  font-weight:800 !important;
  white-space:nowrap;
  cursor:pointer !important;
}

.ui79-reset-skills:hover:not(:disabled){
  border-color:rgba(255,141,131,.7) !important;
  background:rgba(145,47,42,.28) !important;
}

.ui79-reset-skills:disabled{
  opacity:.38 !important;
  cursor:not-allowed !important;
}

.ui79-loadout-label{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin:2px 0 8px;
}

.ui79-loadout-label span,
.ui79-skill-toolbar > span{
  color:#f4e3bb;
  font-size:13px;
  font-weight:900;
  letter-spacing:.06em;
}

.ui79-loadout-label small{
  color:rgba(236,225,199,.5);
  font-size:11px;
}

.ui63-skill-selected.ui79-loadout-slots{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr));
  align-items:stretch !important;
  gap:8px !important;
  margin:0 0 22px !important;
}

.ui79-selected-slot{
  position:relative;
  width:100% !important;
  min-width:0;
  min-height:70px !important;
  padding:10px 9px !important;
  border-radius:12px !important;
  overflow:hidden;
}

.ui79-selected-slot > span:first-child{
  position:absolute;
  top:6px;
  left:7px;
  display:grid;
  place-items:center;
  width:19px;
  height:19px;
  border-radius:6px;
  background:rgba(255,255,255,.07);
  color:rgba(244,227,187,.54);
  font:800 10px/1 system-ui,sans-serif;
}

.ui79-selected-slot.is-empty{
  display:grid;
  place-items:center;
  border:1px dashed rgba(213,174,103,.22);
  background:rgba(255,255,255,.018);
  color:rgba(236,225,199,.32);
}

.ui79-selected-slot.is-empty em{
  font-size:11px;
  font-style:normal;
}

button.ui79-selected-slot.is-filled{
  display:flex !important;
  flex-direction:column;
  align-items:flex-start !important;
  justify-content:flex-end;
  gap:4px;
  border:1px solid rgba(98,217,154,.38) !important;
  background:
    linear-gradient(145deg,rgba(47,126,82,.22),rgba(16,34,26,.32)) !important;
  color:#e8f7ed !important;
  text-align:left;
  cursor:pointer !important;
}

button.ui79-selected-slot.is-filled strong{
  width:100%;
  overflow:hidden;
  color:#e8f7ed;
  font-size:12px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

button.ui79-selected-slot.is-filled em{
  color:rgba(255,180,172,.72);
  font-size:10px;
  font-style:normal;
}

button.ui79-selected-slot.is-filled:hover{
  border-color:rgba(255,141,131,.62) !important;
  background:linear-gradient(145deg,rgba(119,49,45,.25),rgba(39,22,21,.35)) !important;
  transform:translateY(-1px);
}

.ui79-skill-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 11px;
  padding-top:16px;
  border-top:1px solid rgba(213,174,103,.12);
}

.ui79-skill-filters{
  display:inline-flex;
  gap:3px;
  padding:3px;
  border:1px solid rgba(213,174,103,.16);
  border-radius:11px;
  background:rgba(0,0,0,.2);
}

.ui79-skill-filters button{
  width:auto !important;
  min-height:30px !important;
  padding:5px 11px !important;
  border:0 !important;
  border-radius:8px !important;
  background:transparent !important;
  color:rgba(236,225,199,.58) !important;
  font-size:11px !important;
  font-weight:800 !important;
  cursor:pointer !important;
}

.ui79-skill-filters button b{
  margin-left:3px;
  color:inherit;
  font-size:10px;
}

.ui79-skill-filters button:hover{
  color:#f4e3bb !important;
  background:rgba(213,174,103,.08) !important;
}

.ui79-skill-filters button.is-active{
  background:rgba(213,174,103,.16) !important;
  color:#ffe2a4 !important;
  box-shadow:inset 0 0 0 1px rgba(213,174,103,.18);
}

[data-ui79-skill-panel] .ui79-skill-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr)) !important;
  align-items:stretch !important;
  gap:10px !important;
}

[data-ui79-skill-panel] .ui79-skill-card{
  position:relative;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-width:0 !important;
  min-height:164px !important;
  height:auto !important;
  margin:0 !important;
  padding:14px !important;
  border:1px solid rgba(213,174,103,.16) !important;
  border-radius:13px !important;
  background:linear-gradient(160deg,rgba(255,255,255,.035),rgba(255,255,255,.012)) !important;
  color:#efe3c7 !important;
  text-align:left !important;
  box-shadow:none !important;
  cursor:pointer !important;
  transition:border-color .16s ease,background .16s ease,transform .16s ease !important;
}

[data-ui79-skill-panel] .ui79-skill-card:hover{
  border-color:rgba(213,174,103,.42) !important;
  background:linear-gradient(160deg,rgba(213,174,103,.075),rgba(255,255,255,.018)) !important;
  transform:translateY(-1px);
}

[data-ui79-skill-panel] .ui79-skill-card.selected{
  border-color:rgba(98,217,154,.55) !important;
  background:
    linear-gradient(160deg,rgba(48,128,83,.19),rgba(14,31,23,.28)) !important;
  box-shadow:inset 0 0 0 1px rgba(98,217,154,.08) !important;
}

[data-ui79-skill-panel] .ui79-skill-card > b,
[data-ui79-skill-panel] .ui79-skill-card > span:first-child > b{
  display:block;
  max-width:calc(100% - 56px);
  margin:0 0 8px !important;
  overflow:hidden;
  color:#fff0c8 !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

[data-ui79-skill-panel] .ui79-skill-card > span:first-child{
  position:relative;
  display:block !important;
  width:100%;
  margin:0 !important;
}

.ui79-skill-type{
  position:absolute;
  top:11px;
  right:11px;
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border-radius:999px;
  font-size:10px !important;
  font-style:normal !important;
  font-weight:900 !important;
  line-height:1 !important;
}

.ui79-skill-type.active{
  border:1px solid rgba(213,174,103,.32);
  background:rgba(213,174,103,.1);
  color:#f7d795 !important;
}

.ui79-skill-type.passive{
  border:1px solid rgba(184,155,255,.36);
  background:rgba(116,86,190,.13);
  color:#cfbcff !important;
}

[data-ui79-skill-panel] .ui79-skill-card > span:first-child .ui79-skill-type{
  top:-3px;
  right:0;
}

[data-ui79-skill-panel] .ui79-skill-meta{
  display:block !important;
  width:100%;
  margin:0 0 8px !important;
  color:rgba(213,174,103,.72) !important;
  font-size:10px !important;
  font-style:normal !important;
  font-weight:750 !important;
  line-height:1.4 !important;
}

[data-ui79-skill-panel] .ui79-skill-card > span:first-child .ui79-skill-meta{
  padding-right:56px;
}

[data-ui79-skill-panel] .ui79-skill-card > small{
  display:-webkit-box !important;
  flex:1 1 auto;
  width:100%;
  min-height:40px;
  margin:0 0 12px !important;
  overflow:hidden;
  color:rgba(236,225,199,.62) !important;
  font-size:11px !important;
  line-height:1.55 !important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}

[data-ui79-skill-panel] .ui79-skill-action{
  display:block !important;
  width:100%;
  margin-top:auto !important;
  padding-top:9px;
  border-top:1px solid rgba(213,174,103,.1);
  color:rgba(236,225,199,.58) !important;
  font-size:10px !important;
  font-weight:850 !important;
  text-align:right;
}

[data-ui79-skill-panel] .ui79-skill-card.selected .ui79-skill-action{
  color:#8ee6b1 !important;
}

[data-ui79-skill-panel] .ui79-skill-card[hidden]{
  display:none !important;
}

body.v059-paused-readonly [data-ui79-skill-panel] button,
body.v059-paused-readonly [data-ui79-skill-panel] .ui79-skill-card{
  pointer-events:auto !important;
}

.ui79-skill-toast{
  position:fixed;
  left:50%;
  bottom:max(24px,env(safe-area-inset-bottom));
  z-index:2147483200;
  max-width:min(420px,calc(100vw - 32px));
  padding:10px 16px;
  border:1px solid rgba(98,217,154,.42);
  border-radius:999px;
  background:rgba(10,20,15,.96);
  color:#dcf5e5;
  font:800 12px/1.45 system-ui,"Microsoft YaHei",sans-serif;
  box-shadow:0 12px 36px rgba(0,0,0,.45);
  transform:translateX(-50%);
}

.ui79-skill-replace-modal{
  position:fixed;
  inset:0;
  z-index:2147483100;
  display:grid;
  place-items:center;
  padding:20px;
}

.ui79-modal-backdrop{
  position:absolute;
  inset:0;
  width:100% !important;
  height:100% !important;
  border:0 !important;
  background:rgba(0,0,0,.76) !important;
  backdrop-filter:blur(5px);
}

.ui79-skill-replace-modal > section{
  position:relative;
  width:min(760px,100%);
  max-height:min(760px,calc(100vh - 40px));
  overflow:auto;
  padding:22px;
  border:1px solid rgba(213,174,103,.4);
  border-radius:18px;
  background:linear-gradient(180deg,#19140f,#090a0c);
  box-shadow:0 24px 90px rgba(0,0,0,.72);
}

.ui79-skill-replace-modal header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.ui79-skill-replace-modal header span{
  color:#d5ae67;
  font-size:11px;
  font-weight:900;
}

.ui79-skill-replace-modal header h2{
  margin:5px 0 4px;
  color:#fff0c8;
  font-size:22px;
}

.ui79-skill-replace-modal header p{
  margin:0;
  color:rgba(236,225,199,.62);
  font-size:12px;
}

.ui79-skill-replace-modal header > button{
  width:auto !important;
  padding:7px 12px !important;
  border:1px solid rgba(213,174,103,.24) !important;
  border-radius:9px !important;
  background:transparent !important;
  color:#e8d6ae !important;
}

.ui79-replace-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}

.ui79-replace-grid button{
  position:relative;
  display:grid !important;
  grid-template-columns:26px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  width:100% !important;
  min-height:66px !important;
  padding:10px !important;
  border:1px solid rgba(213,174,103,.18) !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.025) !important;
  color:#f0e2c4 !important;
  text-align:left;
}

.ui79-replace-grid button:hover{
  border-color:rgba(213,174,103,.5) !important;
  background:rgba(213,174,103,.08) !important;
}

.ui79-replace-grid button > span{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:7px;
  background:rgba(213,174,103,.1);
  color:#d5ae67;
  font-size:10px;
  font-weight:900;
}

.ui79-replace-grid button b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ui79-replace-grid button small{
  grid-column:2;
  color:rgba(236,225,199,.5);
}

.ui79-replace-grid button strong{
  grid-column:3;
  grid-row:1 / span 2;
  color:#e7c783;
  font-size:10px;
}

[data-ui79-skill-panel] button:focus-visible,
.ui79-skill-replace-modal button:focus-visible{
  outline:2px solid #f0c978 !important;
  outline-offset:2px !important;
}

@media (max-width:900px){
  .ui63-skill-selected.ui79-loadout-slots{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:700px){
  [data-ui79-skill-panel] .ui79-skill-head{
    grid-template-columns:minmax(0,1fr) auto;
  }

  [data-ui79-skill-panel] .ui79-skill-head > div:first-child{
    grid-column:1 / -1;
  }

  .ui79-reset-skills{
    justify-self:end;
  }

  .ui79-loadout-label{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }

  .ui63-skill-selected.ui79-loadout-slots{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ui79-selected-slot{
    min-height:64px !important;
  }

  .ui79-skill-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .ui79-skill-filters{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    width:100%;
  }

  .ui79-skill-filters button{
    width:100% !important;
  }

  [data-ui79-skill-panel] .ui79-skill-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }

  [data-ui79-skill-panel] .ui79-skill-card{
    min-height:148px !important;
  }

  .ui79-skill-replace-modal{
    align-items:end;
    padding:10px;
  }

  .ui79-skill-replace-modal > section{
    width:100%;
    max-height:82vh;
    padding:17px;
    border-radius:17px 17px 12px 12px;
  }

  .ui79-replace-grid{
    grid-template-columns:minmax(0,1fr);
  }
}

@media (prefers-reduced-motion:reduce){
  [data-ui79-skill-panel] .ui79-skill-card,
  .ui79-selected-slot{
    transition:none !important;
  }
}
