:root{
  --asmon-tip-bg: #fff;
  --asmon-tip-text: #1d2327;
  --asmon-tip-border: 1px solid rgba(34,113,177,.25);
  --asmon-tip-shadow: 0 10px 24px rgba(0,0,0,0.12);
  --asmon-tip-radius: 10px;
  --asmon-toast-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.asmon-domainPanel{background:#fff;border-radius:12px;margin-top:12px}
.asmon-domainPanel h3{margin:0 0 10px;font-size:16px}

.asmon-domainTopGrid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.asmon-domainCard{
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  background: #fafafa;
  padding:12px;
  position:relative
}

.asmon-domainCard:focus-within{
  z-index: 100000;
}
.asmon-domainCardTitle{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-weight:800}
.asmon-domainStar{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(0,0,0,.06);font-size:16px}

.asmon-domainField label{display:block;font-weight:700;margin-bottom:6px}
.asmon-domainField select,.asmon-domainField input{width:100%;max-width:100%}
.asmon-domainHint{
  font-size: 16px;
  margin-top: 6px;
  color: rgba(0,0,0,.9);
}
.asmondomain-forcehide{display:none !important}

.asmon-domainPrimaryTitle{
  font-weight: 900;
  font-size: 16px;
}

.asmon-domainSecondaryTitle{
  opacity: .85;
  margin-top: 4px;
}

.asmon-domainTalents{margin-top:14px}
.asmon-divider{height:1px;background:rgba(0,0,0,.10);margin:14px 0}

.asmon-talentSectionTitle{display:flex;align-items:center;gap:10px;margin:0 0 8px;font-weight:900}
.asmon-talentSectionTitle .asmon-domainStar{background:rgba(0,0,0,.06)}

.asmon-talentGrid{
  gap:45px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:10px
}

.asmon-talentCard{
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:12px;
  cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease,filter .12s ease;
  background:linear-gradient(180deg,#fbf6ea 0%,#f4eddc 100%);
  position:relative;
  overflow:hidden;
  min-height:128px;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin: 0;
}

.asmon-domainTalents .asmon-divider{
  margin: 18px 0;
}

.asmon-talentCard:hover{
  transform:scale(1.02);
  box-shadow:0 8px 22px rgba(0,0,0,.10);
}
.asmon-talentCard.is-selected{
  transform: scale(1.02);
  border-width:3px;
  border-color:#1f6fb8;
  filter:saturate(1.02)
}
.asmon-talentCard.is-disabled{opacity:.75;cursor:not-allowed}

.asmon-talentCard.is-passive, .asmon-talentCard.is-passive-full{
  background:linear-gradient(180deg,rgba(250,250,250,.96) 0%,rgba(236,236,236,.96) 100%)
}

.asmon-talentLevelControls{
  position:absolute;
  top:10px;
  right:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  z-index:3
}
.asmon-talentLevelBtn{
  width:30px;
  height:30px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.15);
  background:rgba(255,255,255,.82);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .08s ease, box-shadow .12s ease;
  user-select:none
}
.asmon-talentLevelBtn:hover{transform:scale(1.03);box-shadow:0 6px 16px rgba(0,0,0,.12)}
.asmon-talentLevelBtn:active{transform:scale(.98)}
.asmon-talentLevelBtn[aria-disabled="true"]{opacity:.45;cursor:not-allowed}

.asmon-talentTopRow{
  display:flex;
  gap:12px;
  align-items:stretch;
}
.asmon-talentLeft{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}

.asmon-titleRow{display:flex;gap:10px}

.asmon-talentTitle{
  font-weight:900;
  line-height:1.15;
  margin:0;
  font-size:14px;
  width: 60%;
  word-wrap: normal;
}

.asmon-levelWrap{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 30%;
}

.asmon-levelPill{
  margin-left:auto;
  margin-top:-2px;
  font-size:11px;
  line-height:1;
  border:1px solid rgba(0,0,0,.14);
  border-radius:999px;
  padding:5px 8px;
  background:rgba(255,255,255,.60);
  white-space:nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.asmon-levelPill.is-level2{
  background: rgba(31,111,184,.10);
  border-color: rgba(31,111,184,.55);
  color: #1f6fb8;
  font-weight: 900;
}

.asmon-talentInset{
  background:rgba(255,255,255,.58);
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:10px;
  flex:1
}

.asmon-talentDesc.talentReadOnly{
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.1); 
  padding: 10px 12px;
}

.asmon-talentDesc{
  border-radius: 10px;
  font-size:13px;
  line-height:1.4;
  opacity:.92;
  margin:0
}
.asmon-talentCard{height:100%}
.asmon-talentTopRow{height:100%}
.asmon-talentRight{
  width:128px;
  flex:0 0 128px;
  border-left:none;
  display:flex;
  flex-direction:column;
  align-self:stretch
}
.asmon-talentRight .asmon-talentInset{height:100%;display:flex;flex-direction:column;gap:10px}
.asmon-talentKV{
  display: flex;
  align-items: center;
  font-size: 12.5px;
  gap: 3px;
  flex-direction: column;
  border-bottom: 1px solid lightgray;
}
.asmon-talentKV b{font-weight:900}
.asmon-talentIcon{opacity:.9;margin-right:6px}

.asmon-shake{animation:asmonShake .28s ease-in-out 0s 1}
@keyframes asmonShake{
  0%{transform:translateX(0)}
  20%{transform:translateX(-4px)}
  40%{transform:translateX(4px)}
  60%{transform:translateX(-3px)}
  80%{transform:translateX(3px)}
  100%{transform:translateX(0)}
}

.asmon-racialList{display:flex;flex-direction:column;gap:10px}
.asmon-racialItem{padding:10px;border-radius:12px;background:rgba(255,255,255,.58)}
.asmon-racialItem strong{display:block;margin-bottom:4px}
.asmon-racialItem span{display:block;font-size:16px;opacity:.9;line-height:1.35}

.asmon-domainActions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 50px;
}

.asmon-q{display:inline-block;margin-left:4px;font-size:11px;line-height:1;cursor:help;border:1px solid rgba(0,0,0,18);border-radius:999px;padding:1px 5px;vertical-align:super;background:rgba(255,255,255,60)}
.asmon-domainHintRow{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.asmon-domainHintRight{display:flex;align-items:center;gap:6px}

.asmon-divider{margin:18px 0}

.asmon-talentCard{position:relative}

.asmon-talentLevelControls{
  position:absolute;
  left:-14px;
  top:18px;
  display:flex;
  flex-direction:column;
  gap:6px;
  z-index:2;
}

.asmon-talentLevelBtn{
  width:24px;
  height:24px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,18);
  background:rgba(255,255,255,75);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  line-height:1;
  padding:0;
  cursor:pointer;
  opacity:.9;
}
.asmon-talentLevelBtn:hover{opacity:1}
.asmon-talentLevelBtn[aria-disabled="true"]{opacity:.25;pointer-events:none}
.asmon-levelPill.is-pulse{animation:asmonPillPulse .22s ease-in-out 0s 1}

.asmon-talentSectionTitle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:50px;
}

.asmon-talentSectionTitleLeft{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 900;
}

.asmon-talentDescSolo{
  text-align: justify;
  margin:0;
  line-height:1.35;
  opacity:.95;
  font-size: 15px;
}

.asmon-talentInsetCompact{padding:8px 10px}

.asmon-domainActions{align-items:center}
.asmon-domainDock{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.asmon-talentLevelInline{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-direction: column-reverse;
}

.asmon-talentLevelBtn{
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.asmon-talentLevelBtn[aria-disabled="true"]{
  opacity: 0.35;
  cursor: not-allowed;
}

.asmon-talentCard.is-passive-full .asmon-talentLeft{
  width: 100%;
}

.asmon-talentCard.is-passive-full .asmon-talentDescSolo{
  margin-top: 10px;
}

.asmon-divider{margin:18px 0}
.asmon-levelPill.is-bounce-up{animation:asmonLevelUp .18s ease-out 0s 1}
.asmon-levelPill.is-bounce-down{animation:asmonLevelDown .18s ease-out 0s 1}

.asmondomain-myTalents{
  padding: 12px;
}

.asmondomain-myTalents__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.asmondomain-myTalents__title{
  margin:0;
  font-size:18px;
}

.asmondomain-myTalents__domains{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  font-size:14px;
}

.asmondomain-myTalents__list{
  margin-top:10px;
  font-size:14px;
}

.asmondomain-myTalents__list ul{
  margin:0;
  padding-left:18px;
}

.asmondomain-myTalents__empty{
  opacity:.85;
}

.asmondomain-talents-page #asmondomain_talents_host{
  min-height: 80px;
}

.asmon-levelPill.is-bounce-up { animation: asmonPillUp .26s ease-out; }
.asmon-levelPill.is-bounce-down { animation: asmonPillDown .26s ease-out; }

.asmondomain-myTalents__domainsRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-size:14px;
  margin-bottom:10px;
}

.asmondomain-myTalents__domainCards{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}

.asmondomain-domainCard{
  border:1px solid rgba(0,0,0,0.10);
  border-radius:12px;
  background:rgba(255,255,255,0.58);
  padding:12px;
}

.asmondomain-domainCard__title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
}

.asmondomain-domainCard__desc{
  margin-top:8px;
  font-size:13px;
  line-height:1.35;
  opacity:.92;
}

.asmondomain-myTalents__talentGrid{
  margin-top:12px;
}

.asmondomain-talentTopMeta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
}

.asmondomain-kindPill{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(0,0,0,0.12);
  background:rgba(255,255,255,0.55);
  border-radius:999px;
  padding:2px 8px;
  font-size:12px;
  font-weight:700;
  opacity:.95;
}

.asmondomain-talentDomain{
  font-size:12px;
  opacity:.85;
}

.asmon-talentCard.is-readonly .asmon-talentLevelControls{
  display:none;
}

#asmon_domain_primary{
  width:95%;
}

.asmon-talentInset--split{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.asmon-talentSplitTop,
.asmon-talentSplitBottom{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.asmon-talentSplitBottom{
  border-top:1px solid rgba(0,0,0,0.10);
  padding-top:10px;
}

.asmon-talentSplitLabel{
  font-size:12px;
  opacity:.8;
  font-weight:600;
}

.asmon-talentSplitText{
  font-size:14px;
  line-height:1.35;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}


.asmon-skillCell{
  position: relative;
  overflow: visible;
}

.asmon-skillCell:hover,
.asmon-skillCell:focus-within,
.asmon-skillCell.is-tip-open{
  z-index: 100000;
}

.asmon-skillHelpIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid #2271b1;
  color: #2271b1;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  background: #fff;
  cursor: help;
  user-select: none;
}

.asmon-skillHelpIcon--left{
  margin-left: 0;
  margin-right: 6px;
}

.asmon-domainSkillHint{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.asmon-domainSkillHint__text{
  display: inline;
}
.asmon-domainSkillHint__lead{
  display: inline;
}
.asmon-domainSkillHint__lead::after{
  content: ' ';
}
.asmon-domainSkillHint__list{
  display: inline;
  font-weight: 700;
}

.asmon-skillKeyword[data-tip]{
  position: relative;
  cursor: help;
  text-decoration: underline dotted rgba(34,113,177,.7);
  text-underline-offset: 2px;
}

.asmon-skillKeyword[data-tip]::after{
  content: attr(data-tip);
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-75%);
  width: min(78vw, 130px);
  background: var(--asmon-tip-bg);
  color: var(--asmon-tip-text);
  border: var(--asmon-tip-border);
  box-shadow: var(--asmon-tip-shadow);
  border-radius: var(--asmon-tip-radius);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
  z-index: 100010;
  white-space: normal;
  text-align: center;
}

.asmon-skillKeyword[data-tip]:hover::after,
.asmon-skillKeyword[data-tip]:focus::after,
.asmon-skillKeyword[data-tip].is-tip-open::after{
  display: block;
}

.asmon-skillHelpIcon:focus{
  outline: 2px solid rgba(34,113,177,35);
  outline-offset: 2px;
}

.asmon-skillTip{
  display: none;
  background: var(--asmon-tip-bg);
  color: var(--asmon-tip-text);
  padding: 10px 12px;
  border-radius: var(--asmon-tip-radius);
  border: var(--asmon-tip-border);
  box-shadow: var(--asmon-tip-shadow);
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: min(78vw, 360px);
  max-height: 260px;
  overflow: auto;
  z-index: 100001;
}

.asmon-skillCell.is-tip-open .asmon-skillTip{
  display: block;
}

.asmon-skillCell--tip-up .asmon-skillTip{
  top: auto;
  bottom: calc(100% + 6px);
}

.asmon-talentCard.is-racial{
  border-color:#497262;
  background:linear-gradient(180deg,#f6f1fb 0%,#ece3f7 100%);
}

.asmon-talentSingle{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.asmon-talentPassiveBlock{
  background:rgba(255,255,255,.6);
  border:1px solid rgba(0,0,0,.1);
  border-radius:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:4px;
}

.asmon-talentPassiveDesc{
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
  line-height:1.35;
  white-space:pre-wrap;
  overflow-wrap:break-word;
}

.asmon-talentPassiveConditionsLabel{
  display:block;
  font-weight:700;
  font-size:12px;
  color:#333;
  margin-bottom:4px;
}

.asmon-talentPassiveConditionsText{
  font-size:14px;
  line-height:1.35;
  white-space:pre-wrap;
  overflow-wrap:break-word;
  color:#555;
}

.asmon-talentCard.is-readonly.is-passive-full .asmon-talentPassiveConditions{
  border-radius:10px;
  padding:10px 12px;
}

.asmondomain-myTalents .asmon-talentGrid .asmon-talentCard.is-readonly.is-passive-full .asmon-talentTopRow{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
}

.asmondomain-myTalents .asmon-talentGrid .asmon-talentCard.is-readonly.is-passive-full .asmon-talentLeft,
.asmondomain-myTalents .asmon-talentGrid .asmon-talentCard.is-readonly.is-passive-full .asmon-talentRight{
  width:100%;
  max-width:100%;
  flex:0 0 auto;
}

.asmondomain-warn-badge{
  width: 16px;
  height: 16px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #caa400;
  position: relative;
  cursor: help;
  display: inline-flex;
  margin-left: 5px;
}

.asmondomain-tooltip{
  position:relative;
}

.asmondomain-tooltip::before{
  transform: none !important;
}

.asmon-toastRoot{
  position:fixed;
  top:18vh;
  left:50%;
  transform:translateX(-50%);
  z-index:99999;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
  width:min(92vw,270px)
}
.asmon-toast{
  pointer-events:auto;
  max-width:min(92vw,360px);
  padding:10px 12px;
  border-radius:10px;
  background:rgba(20,20,20,0.92);
  color:#fff;
  box-shadow:var(--asmon-toast-shadow);
  font-size:14px;
  line-height:1.3
}
.asmon-toast__title{font-weight:700;margin-bottom:4px}
.asmon-toast--success{background:rgba(18,102,60,0.95)}
.asmon-toast--error{background:rgba(140,32,32,0.95)}
.asmon-toast--info{background:rgba(25,76,130,0.95)}
.asmon-toast--warn{background:rgba(130,90,25,0.95)}

@keyframes asmonPillUp {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  70% { transform: scale(.98); }
  100% { transform: scale(1); }
}
@keyframes asmonPillDown {
  0% { transform: scale(1); }
  40% { transform: scale(.92); }
  70% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes asmonLevelUp{
  0%{transform:scale(1)}
  60%{transform:scale(1.18)}
  100%{transform:scale(1)}
}
@keyframes asmonLevelDown{
  0%{transform:scale(1)}
  60%{transform:scale(.88)}
  100%{transform:scale(1)}
}

@keyframes asmonPillPulse{
  0%{transform:scale(1)}
  45%{transform:scale(1.08)}
  100%{transform:scale(1)}
}

@media (hover:hover) and (pointer:fine){
  .asmon-skillCell:hover .asmon-skillTip,
  .asmon-skillCell:focus-within .asmon-skillTip{
    display: block;
  }
}

@media (max-width:1024px){
  .asmon-talentGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .asmon-domainTopGrid{grid-template-columns:1fr}
}
@media (max-width:782px){
  .asmon-talentGrid{grid-template-columns:1fr}
  .asmon-talentRight{width:118px;flex-basis:118px}
  .asmondomain-myTalents__domainCards{grid-template-columns:1fr;}
}

@media (max-width: 640px){
  .asmon-domainHint.asmon-domainHintRow{
    flex-direction: column;
    align-items: stretch;
  }
  .asmon-domainHintRight{
    align-items: flex-start;
    width: 100%;
  }
  .asmon-domainSkillHint{
    flex-direction: column;
    align-items: flex-start;
  }
  .asmon-domainSkillHint__text{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }
  .asmon-domainSkillHint__lead{
    display: block;
  }
  .asmon-domainSkillHint__lead::after{
    content: none;
  }
  .asmon-domainSkillHint__list{
    display: block;
    width: 100%;
    line-height: 1.45;
  }

  .asmon-domainHint:has(.asmon-domainSkillHint__text){
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .asmon-skillCell.is-tip-open .asmon-skillHelpIcon{
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 100006;
  }

  .asmon-skillTip{
    position: absolute;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    z-index: 100007;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
    width: min(calc(100vw - 24px), 360px);
    max-width: min(calc(100vw - 24px), 360px);
    max-height: 52vh;
    overflow-x: hidden;
    overflow-y: auto;
    white-space: pre-wrap;
  }

  .asmon-skillKeyword[data-tip]::after{
    position: absolute;
    left: 50%;
    right: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    width: min(calc(100vw - 24px), 110px);
    max-height: 52vh;
    overflow-y: auto;
  }
}

@media (min-width: 641px){
  .asmondomain-myTalents .asmon-talentCard{
    cursor: default;
    transition: none;
  }
  .asmondomain-myTalents .asmon-talentCard:hover{
    transform: none;
    box-shadow: none;
  }
  .asmondomain-myTalents .asmon-talentLevelBtn:hover{
    transform: none;
    box-shadow: none;
  }
}
